mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-13 07:04:53 +09:00
Fix ctl control-config not being recognized
When parsing using the .argv interface to yargs the parser state is not restored back to its pre-parsing state after the operation completes. This causes a susequent reparse with argv to forget its commands and respond with an unknown arguments error when trying to use the control-config command to clusterioctl. Fix by switching to use the parse() interface which does restore the parser state after completing.
This commit is contained in:
1 parent
3592ff3269
commit
b89688597a
1 file changed
+2
-2
+2
-2
@@ -659,7 +659,7 @@ async function startControl() {
|
||||
;
|
||||
|
||||
// Parse the args first to get the configured plugin list.
|
||||
let args = yargs.argv;
|
||||
let args = yargs.parse();
|
||||
|
||||
// Log stream for the ctl session.
|
||||
logger.add(new ConsoleTransport({
|
||||
@@ -722,7 +722,7 @@ async function startControl() {
|
||||
args = yargs
|
||||
.help()
|
||||
.strict()
|
||||
.argv
|
||||
.parse()
|
||||
;
|
||||
|
||||
logger.verbose(`Loading config from ${args.config}`);
|
||||
|
||||
Reference in new issue
Block a user