You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
findConfigFlag consumes next CLI argument when -c= is passed with an empty value #1571
Noticed a small edge case in findConfigFlag (packages/cli/src/services/project-cli.ts lines 72-84 on main commit 79f5ef6). For --config=, passing an empty value returns arg.slice('--config='.length) || undefined (undefined) without consuming args[i + 1].
However, in the short-flag branch (if (arg[j] === 'c')), const value = arg.slice(arg[j + 1] === '=' ? j + 2 : j + 1); return (value || args[i + 1]) || undefined falls back to args[i + 1] even when arg[j + 1] === '=' and the value after = is empty, so -c= (or -pc=) treats the next CLI argument or flag as the config file path instead of returning undefined. Should the arg[j + 1] === '=' case return value || undefined directly like --config= does? Happy to open a small PR with a test if you'd like!
Activity