Skip to content

Commit e343aeb

Browse files
committed
comment and eof
1 parent abea95a commit e343aeb

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

bin/helpers/runnerArgs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,4 +200,4 @@ exports.runOptions = {
200200
describe: Constants.cliMessages.RUN.BUILD_TAG,
201201
type: "string"
202202
}
203-
}
203+
}

bin/testObservability/helper/helper.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -791,12 +791,13 @@ const cleanupTestObservabilityFlags = (rawArgs) => {
791791

792792
for (let i = 0;i < rawArgs.length;i++) {
793793
const arg = rawArgs[i];
794-
const next = i + 1 < rawArgs.length ? rawArgs[i+1] : ''
795794
if (arg.startsWith('-')) {
796795
const argName = arg.length > 1 && arg[1] == '-' ? arg.slice(2) : arg.slice(1);
797-
// If this argument belongs to cli, we omit it and its value
796+
// If this flag belongs to cli, we omit it and its value
798797
if (cliArgs[argName] && !retain.includes(argName)) {
799-
if (cliArgs[argName].type && cliArgs[argName].type !== 'boolean' && !next.startsWith('-')) {
798+
const nextArg = i + 1 < rawArgs.length ? rawArgs[i+1] : ''
799+
// if the flag is bound to have a value, we ignore it
800+
if (cliArgs[argName].type && cliArgs[argName].type !== 'boolean' && !nextArg.startsWith('-')) {
800801
i++;
801802
}
802803
continue;

0 commit comments

Comments
 (0)