Skip to content

Commit 1e32839

Browse files
committed
fix: address PR review feedback
- Handle --flag=value syntax in nodeCliFlags whitelist by extracting base flag name - Use nullish coalescing for process.exit in generate-packages.mjs to handle signal-killed processes (code is null, which coerces to 0)
1 parent 97fc137 commit 1e32839

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

packages/cli/scripts/generate-packages.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const scripts = [
1414
for (const script of scripts) {
1515
const result = await spawn('node', [script], { stdio: 'inherit' })
1616
if (result.code !== 0) {
17-
process.exit(result.code)
17+
// Use nullish coalescing to handle signal-killed processes (code is null).
18+
process.exit(result.code ?? 1)
1819
}
1920
}

packages/cli/src/utils/cli/with-subcommands.mts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,9 +631,11 @@ export async function meowWithSubcommands(
631631
'--spinner',
632632
'--version',
633633
])
634+
// Extract base flag name for --flag=value syntax (e.g., '--config=/path' -> '--config').
635+
const baseFlagName = commandOrAliasName?.split('=')[0]
634636
if (
635637
commandOrAliasName?.startsWith('--') &&
636-
!nodeCliFlags.has(commandOrAliasName)
638+
!nodeCliFlags.has(baseFlagName ?? '')
637639
) {
638640
const pythonResult = await spawnSocketPython(argv, {
639641
stdio: 'inherit',

0 commit comments

Comments
 (0)