Ignore underscore argument

This commit is contained in:
Essem 2021-07-11 15:40:31 -05:00
parent e725c4d1eb
commit e640cc8f77
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C

View file

@ -9,28 +9,30 @@ module.exports = (input) => {
if (a.includes("=")) {
const [arg, value] = a.slice(2).split("=");
let ended = true;
if (value.startsWith("\"")) {
if (value.endsWith("\"")) {
args[arg] = value.slice(1).slice(0, -1);
if (arg !== "_") {
if (value.startsWith("\"")) {
if (value.endsWith("\"")) {
args[arg] = value.slice(1).slice(0, -1);
} else {
args[arg] = `${value.slice(1)} `;
ended = false;
}
} else if (value.endsWith("\"")) {
args[arg] += a.slice(0, -1);
} else if (value !== "") {
args[arg] = value;
} else {
args[arg] = `${value.slice(1)} `;
ended = false;
args[arg] = true;
}
} else if (value.endsWith("\"")) {
args[arg] += a.slice(0, -1);
} else if (value !== "") {
args[arg] = value;
if (args[arg] === "true") {
args[arg] = true;
} else if (args[arg] === "false") {
args[arg] = false;
}
if (!ended) curr = arg;
} else {
args[arg] = true;
args[a.slice(2)] = true;
}
if (args[arg] === "true") {
args[arg] = true;
} else if (args[arg] === "false") {
args[arg] = false;
}
if (!ended) curr = arg;
} else {
args[a.slice(2)] = true;
}
} else if (curr) {
if (a.endsWith("\"")) {