Azure / Azure/acr-cli

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

Open
#74 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
70
Forks
52
Avg merge
3d 2h
Merged PRs (30d)
12

Description

**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](https://user-images.githubusercontent.com/40181455/94226673-067eec00-fead-11ea-8f64-b480f60d29b7.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.