Skip to content

fix(update): make /gsd:update runtime-aware and target correct runtime#931

Open
obouafif wants to merge 1 commit intogsd-build:mainfrom
obouafif:fix/gsd-update-runtime-targeting
Open

fix(update): make /gsd:update runtime-aware and target correct runtime#931
obouafif wants to merge 1 commit intogsd-build:mainfrom
obouafif:fix/gsd-update-runtime-targeting

Conversation

@obouafif
Copy link

@obouafif obouafif commented Mar 4, 2026

Problem

When multiple runtimes are installed (for example Claude + Codex), /gsd:update could target the wrong runtime because the update workflow did not explicitly carry runtime selection through to install execution.

In practice, Codex users could end up with Claude-targeted update behavior instead of a Codex-targeted update path.

What this changes

  • Adds runtime-aware detection in the update workflow (claude, opencode, gemini, codex).
  • Introduces PREFERRED_RUNTIME (derived from execution context, with env-var fallback).
  • Reorders runtime probing so the preferred runtime is checked first.
  • Returns and parses 3 values from detection step:
    • installed version
    • install scope (LOCAL/GLOBAL/UNKNOWN)
    • target runtime
  • Executes update with explicit runtime flag:
    • npx -y get-shit-done-cc@latest "--$TARGET_RUNTIME" --local|--global
  • Keeps safe fallback for unknown installs:
    • --claude --global
  • Updates user-facing text to runtime-neutral wording and includes codex paths in cache-clear/install path notes.

Why this is correct

The installer already supports explicit runtime flags (--claude, --opencode, --gemini, --codex). This change ensures /gsd:update passes the right runtime explicitly instead of relying on default behavior.

Validation

  • Ran full test suite: npm test
  • Result: 527 passed, 0 failed

@obouafif obouafif requested a review from glittercowboy as a code owner March 4, 2026 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant