Skip to content

fix(desktop): restore shell path env for desktop sidecar#15211

Merged
nexxeln merged 1 commit intodevfrom
fix/15195-desktop-path-env
Feb 26, 2026
Merged

fix(desktop): restore shell path env for desktop sidecar#15211
nexxeln merged 1 commit intodevfrom
fix/15195-desktop-path-env

Conversation

@nexxeln
Copy link
Member

@nexxeln nexxeln commented Feb 26, 2026

Issue for this PR

Closes #15195

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Desktop sidecar spawn now loads shell environment safely before launch. It probes SHELL -il -c "env -0" with a hard timeout, falls back to -l only when needed, skips nushell probing, and merges the result with desktop-required env overrides.

This restores PATH-dependent commands in Desktop while keeping protection against interactive shell hangs.

How did you verify your code works?

  • Ran cargo test --lib in packages/desktop/src-tauri.
  • Verified all tests pass, including new unit tests for env parsing, merge precedence, and nushell detection.

Screenshots / recordings

N/A (non-UI desktop backend change)

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@nexxeln nexxeln merged commit bb8a171 into dev Feb 26, 2026
12 checks passed
@nexxeln nexxeln deleted the fix/15195-desktop-path-env branch February 26, 2026 13:05
github-actions bot pushed a commit to chrn11/opencode that referenced this pull request Feb 26, 2026
figloalds pushed a commit to figloalds/opencode that referenced this pull request Feb 27, 2026
jonathanmiddleton pushed a commit to jonathanmiddleton/opencode that referenced this pull request Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Desktop app does not inherit full PATH from shell environment

1 participant