-
Notifications
You must be signed in to change notification settings - Fork 2.4k
fix: Use default shell to execute bash commands on Unix environments #3494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
|
@istarkov @rekram1-node I feel like we should update the system prompt or tool description to tell the LLM what shell will be used. Especially for windows. The tool is called bash after all. |
Probably here
const shellName = (process.env.SHELL || process.env.COMSPEC || (process.platform === 'win32' ? 'cmd.exe' : 'sh'))
.split(/[\\/]/).pop();
...
Platform: ${process.platform}, Shell: ${shellName}But I would not touch this until real windows users have reproducible issues, as probably Platform is enough |
|
Yeah I need to setup a windows environment to test this more and I need to analyze how other tools do it. the tool name being bash yeah it is confusing for the llm almost certainly I think we can addresss that separately tho I want to do more investigation before just changing prompts |
|
I have feeling that at the end it will be running bash in some container env. For reasons like prevent any operation out of project folder etc. |
|
@istarkov for those who use things like nunshell or fish, I wonder if this change could actually make their experience worse We could just also try a check if they have bash installed and use that, but i suppose using the users shell offers some benefits and then it does come back to tool descriptions & names This looks good, I will merge soon just wanna think more about how we can best serve everyone |
|
Given the tool is called bash, almost all unix users have bash, and a lot of windows users have git bash, and the prompts are all about bash, should we just do shell: "bash" if bash is installed? I feel like that's the safest bet here |
|
I have few reasons why current approach is better:
macOS /bin/bash (3.2) 2007 (18+ years old) ;-) |
|
i tend to agree, im just cautious, lemme test something with fish and nushell |
For spawn:
Fixes #3479