RFE: more helpful errcodes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
It seems `snap install` and `snap refresh` only distinguish between fault/success in their exit codes, returning 1 for different faults; e.g.:
peter@pirx ~/tmp » touch bad.snap
peter@pirx ~/tmp » sudo snap install ./bad.snap --dangerous
error: cannot read snap file: "/var/lib/
snapdir
peter@pirx ~/tmp » echo $?
1
peter@pirx ~/tmp » sudo snap install idontexist
error: snap "idontexist" not found
peter@pirx ~/tmp » echo $?
1
peter@pirx ~/tmp » sudo snap install core --asdfadsf
error: unknown flag `asdfadsf'
peter@pirx ~/tmp » echo $? 1
It would be helpful if the cli returned different error codes for different causes, distinguishing between bad resources, network errors, user errors etc. -- would make it easier when calling `snap` from other code to tailor error handling
affects: | snapcraft → snapd |
Changed in snapd: | |
importance: | Undecided → Wishlist |
status: | New → Triaged |