`snap set` silently fails when given an invalid key
Bug #1689396 reported by
Kyle Fazzari
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Fix Released
|
Medium
|
Kyle Fazzari |
Bug Description
Config keys (the keys used by `snap set/get` and `snapctl set/get`) must follow a valid pattern. For example, underscores aren't valid. And you can see that by trying to pass it:
$ snap get my-snap invalid_key
error: invalid option name: "invalid_key"
$ snapctl get invalid_key
error: error running snapctl: invalid option name: "invalid_key"
However, `snap set` doesn't validate like these other commands. If you run `snap set my-snap invalid_key=foo` (assuming `my-snap` has a configure hook), it returns nothing, as if it succeeded. But it didn't: `invalid_key=foo` never made it into the transaction.
Changed in snapd: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Fix here: https:/ /github. com/snapcore/ snapd/pull/ 3280