Related command
az redis export
Describe the bug
After upgrading to azure-cli version greater than 2.40.0 the az redis export command is failing with the following parsing error:
PS C:\Users\austintolani> az redis export --container "<SAS URL>" --prefix "prefix" -g <rg name> -n <cache name> --file-format rdb
the following arguments are required: --prefix
I believe that this issue is due to the ampersand issue described here. Using the stop-parsing token (--%) solves the issue.
It looks like this is a PowerShell issue being tracked at PowerShell/PowerShell#1995 but I'm not sure what changes were introduced in 2.41.0 that would result in different behavior. Runing the identical command on PowerShell with version 2.40.0 does not produce any errors. Looking at the release notes for 2.41.0 I cannot see any related changes.
To Reproduce
- Create a premium Redis cache
- Create a container in storage account and copy the SAS URL
- Run the
az redis export command with a version of azure-cli 2.41.0 or greater on PowerShell
Expected behavior
az redis export command, when passed a valid container URL, should not return any parsing errors
Environment summary
Install method - MSI
CLI version - 2.41.0,2.42.0
Shell Type - PowerShell
Related command
az redis exportDescribe the bug
After upgrading to azure-cli version greater than
2.40.0theaz redis exportcommand is failing with the following parsing error:I believe that this issue is due to the ampersand issue described here. Using the stop-parsing token (
--%) solves the issue.It looks like this is a PowerShell issue being tracked at PowerShell/PowerShell#1995 but I'm not sure what changes were introduced in
2.41.0that would result in different behavior. Runing the identical command on PowerShell with version2.40.0does not produce any errors. Looking at the release notes for 2.41.0 I cannot see any related changes.To Reproduce
az redis exportcommand with a version of azure-cli2.41.0or greater on PowerShellExpected behavior
az redis exportcommand, when passed a valid container URL, should not return any parsing errorsEnvironment summary
Install method - MSI
CLI version - 2.41.0,2.42.0
Shell Type - PowerShell