fix(install): error on mutually exclusive --sdk and --no-sdk flags
Previously passing both silently had --no-sdk win. Exit non-zero with a clear error to match how other exclusive flag pairs (--global/--local, --config-dir/--local) are handled. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -80,6 +80,11 @@ const hasPortableHooks = args.includes('--portable-hooks') || process.env.GSD_PO
|
||||
const hasSdk = args.includes('--sdk');
|
||||
const hasNoSdk = args.includes('--no-sdk');
|
||||
|
||||
if (hasSdk && hasNoSdk) {
|
||||
console.error(` ${yellow}Cannot specify both --sdk and --no-sdk${reset}`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// Runtime selection - can be set by flags or interactive prompt
|
||||
let selectedRuntimes = [];
|
||||
if (hasAll) {
|
||||
|
||||
Reference in New Issue
Block a user