mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-14 10:34:31 +01:00
lightningd: handle --version before trying to move to lightning-dir.
Otherwise it creates the lightning-dir. This can't be helped for --help (at least, if plugins are present), but --version simply prints and exits. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -747,6 +747,9 @@ static void handle_minimal_config_opts(struct lightningd *ld,
|
||||
&ld->config_dir,
|
||||
"Set working directory. All other files are relative to this");
|
||||
|
||||
/* Handle --version (and exit) here too: don't create lightning-dir for this */
|
||||
opt_register_version();
|
||||
|
||||
opt_early_parse_incomplete(argc, argv, opt_log_stderr_exit);
|
||||
|
||||
/* Now, reset and ignore those options from now on. */
|
||||
|
||||
Reference in New Issue
Block a user