Skip to content

Commit 9197b71

Browse files
authored
Fix PowerShell command for file listing (#44041)
Seeing issues where nothing is copied and we don't correctly fail. That is because if nothing copies the default `Path` parameter has this weird behavior and tries to match things with the name of the last component. See https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-childitem?view=powershell-7.5#notes Which in the case of python finds `D:\a\_work\1\s\sdk\synapse\azure-synapse-artifacts\azure\synapse\artifacts` so we always have a file even though it wasn't copied.
1 parent e4c2eff commit 9197b71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eng/pipelines/templates/stages/partner-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ extends:
3838
Inline: |
3939
echo "azcopy copy 'https://azuresdkpartnerdrops.blob.core.windows.net/drops/${{ parameters.BlobPath }}/*' '$(Artifacts)' --recursive=true"
4040
azcopy copy 'https://azuresdkpartnerdrops.blob.core.windows.net/drops/${{ parameters.BlobPath }}/*' '$(Artifacts)' --recursive=true
41-
$copiedFiles = (dir '$(Artifacts)' -r | % { $_.FullName })
41+
$copiedFiles = (dir -LiteralPath '$(Artifacts)' -r | % { $_.FullName })
4242
echo "Copied files: $copiedFiles"
4343
if (!$copiedFiles) {
4444
echo "Failed to copy any files from 'https://azuresdkpartnerdrops.blob.core.windows.net/drops/${{ parameters.BlobPath }}/*' please double check they exist"

0 commit comments

Comments
 (0)