|
|
@ -837,6 +837,11 @@ void handle_early_opts(struct lightningd *ld, int argc, char *argv[]) |
|
|
|
|
|
|
|
void handle_opts(struct lightningd *ld, int argc, char *argv[]) |
|
|
|
{ |
|
|
|
/* Now look for config file, but only handle non-early
|
|
|
|
* options, early ones have been parsed in |
|
|
|
* handle_early_opts */ |
|
|
|
opt_parse_from_config(ld, false); |
|
|
|
|
|
|
|
/* Move to config dir, to save ourselves the hassle of path manip. */ |
|
|
|
if (chdir(ld->config_dir) != 0) { |
|
|
|
log_unusual(ld->log, "Creating configuration directory %s", |
|
|
@ -849,11 +854,6 @@ void handle_opts(struct lightningd *ld, int argc, char *argv[]) |
|
|
|
ld->config_dir, strerror(errno)); |
|
|
|
} |
|
|
|
|
|
|
|
/* Now look for config file, but only handle non-early
|
|
|
|
* options, early ones have been parsed in |
|
|
|
* handle_early_opts */ |
|
|
|
opt_parse_from_config(ld, false); |
|
|
|
|
|
|
|
opt_parse(&argc, argv, opt_log_stderr_exit); |
|
|
|
if (argc != 1) |
|
|
|
errx(1, "no arguments accepted"); |
|
|
|