-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Resolution-AnsweredThe question is answered.The question is answered.
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
- Create a powershell script which passes variable to the "--pattern" argument to
az storage blob upload-batch - Set pattern variable to "" or "`"
- Run script on Windows: Voila it works
- Run script on Linux: It finds no files
- Hard-code the "*" into the "--pattern" argument on Linux, it works
There does not appear to be a way to pass "*" as variable to az storage blob upload-batch on linux, only hardcode it as a parameter; this behavior works as-expected on Windows.
Expected behavior
$Path = "`*"
az storage blob upload-batch `
--auth-mode login `
--pattern $Path `
-s "." `
-d $dest
# Should upload all files in a directory and return a list of files; i.e. ['file1.txt']Actual behavior
$Path = "`*"
az storage blob upload-batch `
--auth-mode login `
--pattern $Path `
-s "." `
-d $dest
# Actually returns [] or no output on Linux, but on Windows works consistently
az storage blob upload-batch `
--auth-mode login `
--pattern '*' `
-s "." `
-d $dest
# Works fineError details
No errorsEnvironment data
pwsh --version
PowerShell 7.4.4
Visuals
No response
Metadata
Metadata
Assignees
Labels
Resolution-AnsweredThe question is answered.The question is answered.