Ordering of command line arguments matters

Bug #1629423 reported by Evan
14
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 [==>___________________________________] 9.66 % 459.36 KB/s 2m30

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`.

Tags: eco-team
Evan (ev)
tags: added: eco-team
Revision history for this message
Michael Vogt (mvo) wrote :

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.

Changed in snappy:
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

@michael a bit confused, for me "snap refresh someapp --channel=edge --devmode" works fine, the order doesn't seem to matter.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Snappy because there has been no activity for 60 days.]

Changed in snappy:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.