snapcraft options are position-dependent
Bug #1841892 reported by
Michał Sawicz
This bug affects 8 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Triaged
|
Medium
|
Sergio Schvezov |
Bug Description
$ snapcraft --use-lxd build
Support for 'multipass' needs to be set up. Would you like to do that it now? [y/N]:
vs.
$ snapcraft build --use-lxd
Launching a container
Command line options being positional makes for a very confusing user experience. And if `--use-lxd` is an invalid option before the command, it should be a straight-up error instead of being ignored.
description: | updated |
Changed in snapcraft: | |
status: | New → Triaged |
importance: | Undecided → Medium |
assignee: | nobody → Sergio Schvezov (sergiusens) |
To post a comment you must log in.
This issue prevents setting up a simple Bash alias that always uses LXD.
I would like to define the following alias:
~/.bash_aliases 'snapcraft --use-lxd'
---------------
alias snapcraft=
The workaround is to define a function with a different name that puts the option at the end of the command line, like this:
~/.bash_aliases
---------------
function sc() {
snapcraft $@ --use-lxd
}