Allow global params after command
Bug #1993368 reported by
Bryce Harrington
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ppa-dev-tools |
Fix Released
|
Low
|
Bryce Harrington |
Bug Description
This works:
$ ./scripts/ppa --version create
ppa 0.2.1
But this does not, and probably should:
$ ./scripts/ppa create --version
usage: ppa create [-h] [-a ARCHITECTURES] ppa-name
ppa create: error: the following arguments are required: ppa-name
While it's unlikely people will expect to use --version with a command, other options like --dry-run, --verbose, and --quiet should probably work from anywhere on the command line.
Related branches
ppa-dev-tools:fix-lp1993368-cli-arg-behavior
- Christian Ehrhardt (community): Approve
- Canonical Server: Pending requested
- Canonical Server Reporter: Pending requested
-
Diff: 450 lines (+119/-71)2 files modified.flake8 (+1/-1)
scripts/ppa (+118/-70)
Changed in ppa-dev-tools: | |
status: | In Progress → Fix Committed |
To post a comment you must log in.
I've got a fix for this, that applies the global options also to each subparser. Seems to work, I'll file an MP soon.