Skip to content

Commit 784a969

Browse files
committed
chore: fix cucumber tests
1 parent 7a5fdef commit 784a969

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/lib/command-framework/apify-command.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,12 @@ export abstract class ApifyCommand<T extends typeof BuiltApifyCommand = typeof B
393393

394394
const flagKey = kebabCaseString(camelCaseToKebabCase(key)).toLowerCase();
395395

396-
finalYargs = internalBuilderData.builder(finalYargs, flagKey);
396+
// yargs handles "no-" flags by negating the flag, so we need to handle that differently if we register a flag with a "no-" prefix
397+
if (flagKey.startsWith('no-')) {
398+
finalYargs = internalBuilderData.builder(finalYargs, flagKey.slice(3));
399+
} else {
400+
finalYargs = internalBuilderData.builder(finalYargs, flagKey);
401+
}
397402
}
398403
}
399404

0 commit comments

Comments
 (0)