Dashboard › craft › spawnProcess no-ops in dry-run — breaks…
019db1ee-c097-7368-b790-eb49552aa1b2| Project | Hits | Last recalled |
|---|---|---|
| opencode-lore | 2 | 11h ago |
src/utils/system.ts spawnProcess returns undefined immediately in dry-run mode (unless enableInDryRunMode or worktree mode is set) — it never actually spawns the child. Any logic that relies on observable side effects (files written, state changed) after a spawn will see unchanged state in dry-run. Example trap: post-checking package.json version after npm version to detect successful-but-errored bumps would incorrectly trigger fallback paths in dry-run because the spawn is skipped and files stay stale. Mitigation: guard post-check / fallback logic with isDryRun() and short-circuit to the existing dry-run success behavior. File writes don't have this problem if routed through safeFs.writeFileSync which handles dry-run natively.