From 52d4d4a706995c3abac7107059f5606e0751d9cf Mon Sep 17 00:00:00 2001 From: kuntal1461 Date: Wed, 2 Sep 2026 18:31:27 +0530 Subject: [PATCH] fix: recover no-* boolean aliases swallowed by parseArgs allowNegative Node.js parseArgs with allowNegative:true intercepts --no-X before the options table lookup, storing rawFlags['X'] = false instead of rawFlags['no-X'] = true. This caused apify create --no-optional to be silently ignored: _parseFlags checked for 'no-optional' in rawFlags, found nothing, and left omitOptionalDeps undefined, so optional deps always installed regardless of the flag. Fix: after the allMatchers lookup, scan any no-* aliases and check whether their stripped positive name is stored as false in rawFlags. If found, set rawFlag = true so the rest of the boolean parsing path proceeds normally. Fixes #1349 --- src/lib/command-framework/apify-command.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/lib/command-framework/apify-command.ts b/src/lib/command-framework/apify-command.ts index cfede72ad..b65617bb5 100644 --- a/src/lib/command-framework/apify-command.ts +++ b/src/lib/command-framework/apify-command.ts @@ -523,6 +523,19 @@ export abstract class ApifyCommand