Skip to content

Commit 707c637

Browse files
authored
chore: use args from cmd (#7112)
1 parent 32a9dcd commit 707c637

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

src/node/utils/Cli.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,30 +25,34 @@
2525
export const argv: Record<string, string> = {};
2626

2727
const argvInternal = process.argv.slice(2);
28-
let arg, prevArg;
28+
let arg, prevArg = "";
2929

3030
// Loop through args
3131
for (let i = 0; i < argvInternal.length; i++) {
3232
arg = argvInternal[i];
3333

3434
// Override location of settings.json file
3535
if (prevArg && prevArg === '--settings' || prevArg === '-s') {
36+
console.log("Using specified settings from command line");
3637
argv.settings = arg;
3738
}
3839

3940
// Override location of credentials.json file
4041
if (prevArg && prevArg === '--credentials') {
41-
exports.argv.credentials = arg;
42+
console.log("Using specified credentials from command line");
43+
argv.credentials = arg;
4244
}
4345

4446
// Override location of settings.json file
4547
if (prevArg && prevArg === '--sessionkey') {
46-
exports.argv.sessionkey = arg;
48+
console.log("Using specified session key from command line");
49+
argv.sessionkey = arg;
4750
}
4851

4952
// Override location of APIKEY.txt file
5053
if (prevArg && prevArg === '--apikey') {
51-
exports.argv.apikey = arg;
54+
console.log("Using specified API key from command line");
55+
argv.apikey = arg;
5256
}
5357

5458
prevArg = arg;

0 commit comments

Comments
 (0)