acr-cli
acr-cli copied to clipboard
acr purge command with missing ago parameter can cause --dry-run parameter not to be parsed
Describe the bug missing value for --ago parameter can cause unintended consequences if --dry-run is the last parameter used. Looks like the system ignores the --dry-run parameter and executes the command. It would be nice to have a parse error instead
To Reproduce Steps to reproduce the behavior:
- PURGE_CMD="acr purge --filter 'anhamilt/dotnet/core/sdk:latest' --ago --dry-run"
- az acr run --cmd "$PURGE_CMD" --registry myregistrytocleanup /dev/null
Expected behavior Parsing error stating no value was provided for --ago
Screenshots