forked from Mirror/pmbootstrap
pmb.helpers.frontend.config: add support for clearing a config value (!1907)
Previously these two commands would both print the current value: pmbootstrap config extra_packages pmbootstrap config extra_packages '' With this change, the second command will instead set the given config value to the empty string.
This commit is contained in:
parent
098eb4710e
commit
00a4eaf91d
1 changed files with 1 additions and 1 deletions
|
@ -140,7 +140,7 @@ def config(args):
|
||||||
raise RuntimeError("Invalid config key: " + args.name)
|
raise RuntimeError("Invalid config key: " + args.name)
|
||||||
|
|
||||||
cfg = pmb.config.load(args)
|
cfg = pmb.config.load(args)
|
||||||
if args.value:
|
if args.value is not None:
|
||||||
cfg["pmbootstrap"][args.name] = args.value
|
cfg["pmbootstrap"][args.name] = args.value
|
||||||
logging.info("Config changed: " + args.name + "='" + args.value + "'")
|
logging.info("Config changed: " + args.name + "='" + args.value + "'")
|
||||||
pmb.config.save(args, cfg)
|
pmb.config.save(args, cfg)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue