Skip to content

Fix GUI subprocess PATH#93

Open
jimmystridh wants to merge 2 commits into
debuglebowski:mainfrom
jimmystridh:codex/fix-gui-subprocess-path
Open

Fix GUI subprocess PATH#93
jimmystridh wants to merge 2 commits into
debuglebowski:mainfrom
jimmystridh:codex/fix-gui-subprocess-path

Conversation

@jimmystridh
Copy link
Copy Markdown
Contributor

@jimmystridh jimmystridh commented May 28, 2026

Fixes GUI-launched Git/GitHub commands missing user PATH.

SlayZone was spawning Git worktree operations directly from Electron PATH and running gh through interactive zsh. That broke Git LFS hooks when Homebrew was missing from PATH, and let zsh prompt/gitstatus noise make gh PR listing fail.

This moves enriched PATH into the shared platform shell helper, applies it to worktree subprocesses and setup scripts, and runs gh directly with that environment so shell startup files cannot contaminate stderr.

Validation:

  • @slayzone/platform tests
  • @slayzone/worktrees typecheck
  • @slayzone/terminal typecheck
  • @slayzone/app typecheck
  • stripped-PATH smoke for git-lfs and gh pr list
  • macOS arm64 app build + codesign verify

Greptile Summary

This PR fixes GUI-launched subprocess PATH handling for Git and GitHub CLI workflows. The main changes are:

  • Adds marker-based PATH probing for noisy shell startup output.
  • Applies the enriched PATH to worktree subprocess execution.
  • Runs gh directly through the resolved binary path instead of through the interactive shell.
  • Uses platform-specific path helpers for CLI install paths.
  • Skips an unwritable-directory migration test on Windows.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
packages/domains/terminal/src/main/shell-env.ts Adds marker-filtered PATH extraction and resolves binaries using enriched environment state.
packages/domains/worktrees/src/main/exec-async.ts Injects the enriched PATH into worktree subprocesses.
packages/domains/worktrees/src/main/gh-cli.ts Runs the resolved gh binary directly to avoid shell startup output corrupting command results.
packages/shared/platform/src/cli-install.ts Uses platform-specific path joins for CLI install target and Windows shim copy paths.

Reviews (1): Last reviewed commit: "fix(platform): pass Windows platform tes..." | Re-trigger Greptile

Context used:

  • Context used - CLAUDE.md (source)
  • Context used - AGENTS.md (source)

@jimmystridh jimmystridh force-pushed the codex/fix-gui-subprocess-path branch 5 times, most recently from a5e4265 to 81c193e Compare May 28, 2026 12:55
@jimmystridh jimmystridh force-pushed the codex/fix-gui-subprocess-path branch from 81c193e to daff742 Compare May 28, 2026 13:08
@jimmystridh jimmystridh changed the title [codex] Fix GUI subprocess PATH Fix GUI subprocess PATH May 29, 2026
@jimmystridh jimmystridh marked this pull request as ready for review May 29, 2026 10:25
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