waveterm icon indicating copy to clipboard operation
waveterm copied to clipboard

[Bug]: wsh run -- <command> [<args...>] disregards PATH

Open vtomilin opened this issue 3 months ago • 0 comments

Current Behavior

Say I have a dotnet command, available in my PATH (at /usr/local/share/dotnet/dotnet) . If I run wsh run -x -- dotnet build for example, I get:

zsh:1: command not found: dotnet

process finished with exit code = 127

Same command, e.g. dotnet build run simply in Wave's terminal runs just fine. The issue appears in the fact that wsh does not seem to honour PATH assignments in ./.zshrc.

For example, if I run `wsh run -c 'printenv PATH' I see just a few directories listed:

/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

Expected Behavior

wsh run -- command runs the command in same way as if the command were executed in a terminal block manually, e.g. respecting shell environment, setup in ~/.zshrc.

Steps To Reproduce

  1. Open a terminal block
  2. Run wsh run -- <command> where <command> would be a command that is on the PATH but not on the list, returned by `wsh run -c 'printenv PATH'
  3. Observe: zsh:1: command not found: dotnet process finished with exit code = 127

Wave Version

v0.12.2

Platform

macOS

OS Version/Distribution

Sequoia 15.7.2 (24G325)

Architecture

x64

Anything else?

No response

Questionnaire

  • [ ] I'm interested in fixing this myself but don't know where to start
  • [ ] I would like to fix and I have a solution
  • [x] I don't have time to fix this right now, but maybe later

vtomilin avatar Nov 17 '25 00:11 vtomilin