path is not correctly set in shells inside the app #63

Closed
opened 2026-08-01 07:14:04 +00:00 by hugo · 1 comment
Owner

when the app runs a command, it does not get the full path, it only gets a system path. it needs the same path as a user shell would get. this might be related to wether it uses /bin/sh or zsh, because user shells use zsh. I noticed the problem when the llm couldn't find the command "tea" on the path, despite it being available, but installed via homebrew. the path should not be fixed, it should run commands via shell in the same way as the user running the app would in a terminal, so same environment settings need to apply.

when the app runs a command, it does not get the full path, it only gets a system path. it needs the same path as a user shell would get. this might be related to wether it uses /bin/sh or zsh, because user shells use zsh. I noticed the problem when the llm couldn't find the command "tea" on the path, despite it being available, but installed via homebrew. the path should not be fixed, it should run commands via shell in the same way as the user running the app would in a terminal, so same environment settings need to apply.
hugo added the bugcritical labels 2026-08-01 07:14:04 +00:00
Author
Owner

Implemented in d0431ed. Agent commands now run through the configured user shell as an interactive login shell, loading both login and interactive startup files so user PATH entries such as Homebrew are available. The existing sanitized base environment, project working directory, file-size limit, process-group cancellation, timeouts, and output capture remain intact. DS4 has no corresponding agent shell functionality, so this is DS4Server-specific. Verified with focused login/interactive environment and agent job tests plus cargo fmt --all -- --check, cargo clippy --all-targets --all-features -- -D warnings, make bundle, and cargo test --all-features (161 passed, 13 environment-dependent ignored).

Implemented in d0431ed. Agent commands now run through the configured user shell as an interactive login shell, loading both login and interactive startup files so user PATH entries such as Homebrew are available. The existing sanitized base environment, project working directory, file-size limit, process-group cancellation, timeouts, and output capture remain intact. DS4 has no corresponding agent shell functionality, so this is DS4Server-specific. Verified with focused login/interactive environment and agent job tests plus cargo fmt --all -- --check, cargo clippy --all-targets --all-features -- -D warnings, make bundle, and cargo test --all-features (161 passed, 13 environment-dependent ignored).
hugo closed this issue 2026-08-01 07:41:38 +00:00
Sign in to join this conversation.