fix(#130): skip opencode permission config under GSD_TEST_MODE (#404)

finishInstall called configureOpencodePermissions unconditionally, causing
fs.mkdirSync + fs.writeFileSync to run even under GSD_TEST_MODE='1', violating
the side-effect-free contract. Guarded the call with !process.env.GSD_TEST_MODE.

Fixes #130

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-05-27 20:22:09 -04:00
committed by GitHub
parent 616b387f12
commit fd061fccc5
3 changed files with 81 additions and 1 deletions

View File

@@ -9798,7 +9798,7 @@ function finishInstall(settingsPath, settings, statuslineCommand, shouldInstallS
}
// Configure OpenCode permissions
if (isOpencode) {
if (isOpencode && !process.env.GSD_TEST_MODE) {
configureOpencodePermissions(isGlobal, configDir);
}