More strict key check in snap/snapctl get/set broke existing snap
Bug #1658140 reported by
Paweł Stołowski
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
The handling of config option keys became more strict on 2016-10-01, with the following:
var validKey = regexp.
so capital letters are not accepted now. There is at least one known snap (openhab) whose configure script broke because of that.
Also, it seems that the related validation error is not propagated correctly as expected, e.g.
$ sudo snap set openhab OPENHAB_
is silently accepted (no error). The option is of course not set:
pawel@ubuntu:~$ sudo snap get openhab OPENHAB_HTTPS_PORT
error: invalid option name: "OPENHAB_
To post a comment you must log in.
fwiw just adding (?i) to the start of the regexp would address this, if it's what's wanted.