cli-argument-parser
Advanced tools
Comparing version 0.5.3 to 0.5.4
@@ -20,4 +20,11 @@ "use strict"; | ||
if (syncArgv) { | ||
for (const argName in parsedContens) { | ||
process.argv.push(`--${argName}=${parsedContens[argName]}`); | ||
for (const [key, value] of Object.entries(parsedContens)) { | ||
const argvItemValue = `--${key}=${value}`; | ||
const index = process.argv.findIndex(argItem => argItem === argvItemValue); | ||
if (index >= 0) { | ||
process.argv[index] = argvItemValue; | ||
} | ||
else { | ||
process.argv.push(argvItemValue); | ||
} | ||
} | ||
@@ -24,0 +31,0 @@ } |
{ | ||
"name": "cli-argument-parser", | ||
"version": "0.5.3", | ||
"version": "0.5.4", | ||
"description": "A package containing relevant CLI actions", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10362
118