acr-cli icon indicating copy to clipboard operation
acr-cli copied to clipboard

acr purge command with missing ago parameter can cause --dry-run parameter not to be parsed

Open AndreHamilton-MSFT opened this issue 4 years ago • 0 comments

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:

  1. PURGE_CMD="acr purge --filter 'anhamilt/dotnet/core/sdk:latest' --ago --dry-run"
  2. az acr run --cmd "$PURGE_CMD" --registry myregistrytocleanup /dev/null

Expected behavior Parsing error stating no value was provided for --ago

Screenshots Screenshot

AndreHamilton-MSFT avatar Sep 25 '20 04:09 AndreHamilton-MSFT