Ordering of command line arguments matters
Bug #1629423 reported by
Evan
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snappy |
Expired
|
Medium
|
Unassigned |
Bug Description
What happens:
$ sudo snap refresh ubuntu-core --channel=edge
error: cannot refresh "ubuntu-core": snap "ubuntu-core" has no updates available
$ sudo snap refresh --channel=edge ubuntu-core
7.22 MB / 74.70 MB [==>___
What I would expect to happen:
The location of the --channel option would not matter, as I would not expect to do something like `snap refresh --channel=edge ubuntu-core --channel=stable docker`.
This is (currently) intended behavior, we follow the posix convention here that after a non-option no options are parsed. See
https:/ /github. com/jessevdk/ go-flags/ blob/master/ parser. go#L107
If you feel this is too confusing, we can re-evaluate this behaviour.