Context
Reported in #1304 by @BenNewman100. After openspec config profile saves profile/workflow changes and the user confirms "Apply changes to this project now?", OpenSpec shells out through npx openspec update. That fails for Bun global installs and standalone binary installs where openspec is available on PATH but npx is not.
Root Cause
src/commands/config.ts imports execSync and calls execSync('npx openspec update', { stdio: 'inherit', cwd: projectDir }) in the interactive apply-now path.
- The UX and fallback message already tell users to run
openspec update, so the implementation is inconsistent with the supported non-npm installation paths.
- The focused regression in
test/commands/config-profile.test.ts currently asserts the hardcoded npx command, so it will need to be updated.
Proposed Fix
- Replace the apply-now command with
openspec update instead of npx openspec update.
- Update
test/commands/config-profile.test.ts to expect execSync('openspec update', { stdio: 'inherit', cwd: fs.realpathSync(tempDir) }).
- Run the focused test:
pnpm test test/commands/config-profile.test.ts.
Files to Modify
src/commands/config.ts
test/commands/config-profile.test.ts
Closes #1304
Context
Reported in #1304 by @BenNewman100. After
openspec config profilesaves profile/workflow changes and the user confirms "Apply changes to this project now?", OpenSpec shells out throughnpx openspec update. That fails for Bun global installs and standalone binary installs whereopenspecis available onPATHbutnpxis not.Root Cause
src/commands/config.tsimportsexecSyncand callsexecSync('npx openspec update', { stdio: 'inherit', cwd: projectDir })in the interactive apply-now path.openspec update, so the implementation is inconsistent with the supported non-npm installation paths.test/commands/config-profile.test.tscurrently asserts the hardcodednpxcommand, so it will need to be updated.Proposed Fix
openspec updateinstead ofnpx openspec update.test/commands/config-profile.test.tsto expectexecSync('openspec update', { stdio: 'inherit', cwd: fs.realpathSync(tempDir) }).pnpm test test/commands/config-profile.test.ts.Files to Modify
src/commands/config.tstest/commands/config-profile.test.tsCloses #1304