Skip to content

Commit c3e0967

Browse files
azure-sdkscbedd
andauthored
Sync eng/common directory with azure-sdk-tools for PR 8831 (#5913)
* we want the path that we write to to be defined by literalpath, otherwise files with [ or ] will break powershell when writing the file to disk * slight wording adjustment so the command can be invoked directly --------- Co-authored-by: Scott Beddall <[email protected]>
1 parent cf562e0 commit c3e0967

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

eng/common/testproxy/scripts/tag-merge/merge-proxy-tags.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ function Locate-Assets-Slice($ProxyExe, $AssetsJson, $MountDirectory) {
111111

112112
function Get-Tag-SHA($TagName, $WorkingDirectory) {
113113
$results = Git-Command "ls-remote origin $TagName" $WorkingDirectory
114-
114+
115115
if ($results -and $lastexitcode -eq 0) {
116116
$arr = $results -split '\s+'
117-
117+
118118
return $arr[0]
119119
}
120120

@@ -124,7 +124,7 @@ function Get-Tag-SHA($TagName, $WorkingDirectory) {
124124

125125
function Start-Message($AssetsJson, $TargetTags, $AssetsRepoLocation, $MountDirectory) {
126126
$alreadyCombinedTags = Load-Incomplete-Progress $MountDirectory
127-
127+
128128
$TargetTags = $TargetTags | Where-Object { $_ -notin $alreadyCombinedTags }
129129

130130
if ($alreadyCombinedTags) {
@@ -172,7 +172,7 @@ function Finish-Message($AssetsJson, $TargetTags, $AssetsRepoLocation, $MountDir
172172

173173
$suffix = if ($len -gt 1) { "s" } else { "" }
174174

175-
Write-Host "`nSuccessfully combined $len tag$suffix. Invoke `"test-proxy push " -NoNewLine
175+
Write-Host "`nSuccessfully combined $len tag$suffix. Invoke `"test-proxy push -a " -NoNewLine
176176
Write-Host $AssetsJson -ForegroundColor Green -NoNewLine
177177
Write-Host "`" to push the results as a new tag."
178178
}
@@ -256,7 +256,7 @@ function Combine-Tags($RemainingTags, $AssetsRepoLocation, $MountDirectory, $Rel
256256
$pushedTags = Load-Incomplete-Progress $MountDirectory
257257

258258
$testFile = Get-ChildItem -Recurse -Path $AssetsRepoLocation | Where-Object { !$_.PSIsContainer } | Select-Object -First 1
259-
Add-Content -Path $testFile -Value "`n"
259+
Add-Content -LiteralPath $testFile -Value "`n"
260260

261261
# if we have successfully gotten to the end without any non-zero exit codes...delete the mergeprogress file, we're g2g
262262
Cleanup-Incomplete-Progress $MountDirectory

0 commit comments

Comments
 (0)