-
Notifications
You must be signed in to change notification settings - Fork 5.6k
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
PATH environment variable not set on initial terminal #1585
Comments
Hi, the environment is either inherited by the CodeServer's environment or not. If the first terminal does not have the PATH but the following ones do, something else is wrong. Check how the first shell gets started and how the others are. If there's a difference there's a high chance that the PATH modification inside .bash_login, .bashrc, whatever is ignored because the shell is not a login or an interactive shell. Cu |
I'm not setting PATH in a shell env file like .bash_login, .bashrc, etc. (which only works with bash and would be ignored by the default sh or another shell). I'm exporting it in the environment before running code-server. |
Why are you using |
Are you directing Docker to pass it in with |
Oh sorry replied to wrong person. Closing for lack of activity and no one else can reproduce. |
I have the same problem, this is my Dockerfile:
As you see, PATH is set in the environment before Then in the vscode terminal:
As you can see, Same problem with Also neither |
Are you sure files like |
Ah yup check this out:
It sets |
I can't really test this on VSCode so I haven't done that.
I'm running code-server in a docker container and have exported PATH to include /usr/local/go/bin in the path. When loading the app, the initial terminal window does not have the PATH set. Any additional terminals have the path set properly. Opening a new Chrome tab and launching code-server has the same behavior.
To replicate my setup, you can use:
docker create
--name=code-server
-e PUID=1000
-e PGID=1000
-e TZ=America/New_York
-e DOCKER_MODS=linuxserver/mods:code-server-python3|nixapps/codeserver-golang:latest
-p 8443:8443
-v /path/to/appdata/config:/config
--restart unless-stopped
linuxserver/code-server
You'll notice /usr/local/go/bin is not in the path at first but it will be if you open up another terminal.
The text was updated successfully, but these errors were encountered: