From 08b1d8377d29eb1bbc5198f7b0e3492897b28667 Mon Sep 17 00:00:00 2001 From: Jeremy McSpadden Date: Fri, 17 Apr 2026 16:03:25 -0500 Subject: [PATCH] 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) --- bin/install.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/install.js b/bin/install.js index b36891223..3e953904e 100755 --- a/bin/install.js +++ b/bin/install.js @@ -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) {