mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
daemon: Correctly handle '--discover' with no value.
Previously, we'd get: $ guix-daemon --discover error: basic_string::_M_construct null not valid * nix/nix-daemon/guix-daemon.cc (parse_opt): Change second argument to 'settings.set' to properly handle case where ARG is NULL.
This commit is contained in:
parent
f194fbf50e
commit
bc3896db25
1 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
/* GNU Guix --- Functional package management for GNU
|
||||
Copyright (C) 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
|
||||
Copyright (C) 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
|
||||
Copyright (C) 2006, 2010, 2012, 2014 Eelco Dolstra <e.dolstra@tudelft.nl>
|
||||
|
||||
This file is part of GNU Guix.
|
||||
|
@ -268,7 +268,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
|
|||
break;
|
||||
case GUIX_OPT_DISCOVER:
|
||||
useDiscover = string_to_bool (arg);
|
||||
settings.set("discover", arg);
|
||||
settings.set ("discover", useDiscover ? "true" : "false");
|
||||
break;
|
||||
case GUIX_OPT_DEBUG:
|
||||
verbosity = lvlDebug;
|
||||
|
|
Loading…
Reference in a new issue