DashboardcraftspawnProcess no-ops in dry-run — breaks…

spawnProcess no-ops in dry-run — breaks post-check logic

Category: gotcha
Confidence: 1.00
ID: 019db1ee-c097-7368-b790-eb49552aa1b2
Project ID: e16af391-c497-4837-b681-c849a5514499
Cross-project: No
Recalled in other projects: 1
Source session: (none)
Created: 2026-07-28 10:15:42
Updated: 2026-07-28 10:15:42

Cross-Project Recalls

ProjectHitsLast recalled
opencode-lore 2 11h ago

Content

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.

Move to: