-
Notifications
You must be signed in to change notification settings - Fork 30k
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
login shell in integrated terminal stopped working on 1.75.0 #173277
Comments
Pretty sure this hasn't changed recently - for bash login shells, the |
@meganrogge, I am sure that it was still working the minute before I closed VSCode, and it ran the auto update. When I opened vscode the next time, it didn't work anymore. There is also no bash_profile. It also wouldn't pair well with the fact that my bash_login is indeed used, except for the in VsCodes integrated terminal. If that wasn't the case, I would not open the issue specifically with VS Code. find ~ -maxdepth 1 -type f -name .bash_profile
# wow such empty I would appreciate if that could be opened again. |
Hm, I just noticed that it works when I click explicitly on the bash terminal to open a terminal. So it appears to be linked to the default terminal. It does not work when I simply click the plus icon or drag the lower edge of the editor up. This is from the plus icon: And this is from using explicit bash: By explicit bash, I mean the entry in the dropdown If you look closely, you see that the icons are also different for both terminal in the split. If I hover over them, both say the same thing. |
cannot reproduce even when I delete my default profile. |
@bluebrown does this only happen when you open the terminal panel, close the window and reopen it such that the panel gets "restored"? There have been bugs in the past around the first shell launched when the panel gets restored after startup. |
@Tyriar, before I set my default terminal, it would not work at all. Now, since I have the default terminal set, it behaves like you describe. When I open a new VS Code window, it's still using the "wrong" bash. I need to close the terminal and open a fresh one, for the login shell to work. |
At the same time this issue appeared for me, in the Jan 2023 update, I also found that terminals take a much longer time to open and that there's a node process under heavy load. Should I open a new issue for this, or could it be related to this issue? 2023-03-03 edit: seems to be fixed in 1.76. |
I'm seeing similar behavior to @bluebrown. When I reconnect to a Remote SSH host that had open integrated terminal tabs, they are re-opened as the built-in (It's quite possible that the Remote SSH reconnection is unrelated, but that's the only place I re-open windows with integrated terminal tabs like this regularly.) |
I use PowerShell as a login shell on Linux, as described in the Microsoft documentation, ‘On Linux and macOS, starts PowerShell as a login shell, using > cat ~/.profile
if [ -f "$HOME/.cargo/env" ]; then . "$HOME/.cargo/env"; fi
if [ -d "$HOME/.local/share/fnm" ]; then export PATH="$HOME/.local/share/fnm:$PATH"; fi When I access my Linux using any terminal emulator via the ssh command, .profile is executed and PATH behaves normally. > $env:PATH
/run/user/1000/fnm_multishells/159305_1680016851874/bin:/opt/microsoft/powershell/7:/home/garfield/.local/share/fnm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin However, when I use VSCode Remote SSH to connect to my Linux and open VSCode’s Integrated Terminal, I observe that .profile is not executed and PATH is not modified. > $env:PATH
/opt/microsoft/powershell/7:/home/garfield/.vscode-server/bin/ee2b180d582a7f601fa6ecfdad8d9fd269ab1884/bin/remote-cli:/opt/microsoft/powershell/7:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin As you can see, the PATH of the Powershell in VSCode Integrated Terminal does not include |
What's the best way to verify this? I made an executable
but I don't see "hi" being echo'ed. |
@connor4312 add something to your |
I am still experiencing this issue under SSH Remote from Windows to Linux (ubuntu) I have following settings in both host and remote, but it doesn't seem to be effective. I have to manually run "terminal.integrated.profiles.linux": {
"bash": {
"path": "bash",
"args": [
"--login"
],
"icon": "terminal-linux",
}
}, @meganrogge which version is this issue fixed?
|
Does this issue occur when all extensions are disabled?: Yes/No
Steps to Reproduce:
After updating vscode to 1.75.0, yesterday. The below config is not working anymore. Before that, I would get my configurations bound to running a login shell.
Particularly, I use starship and have set this in ~/.bash_login. But my prompt is not using starship in vscode anymore.
The text was updated successfully, but these errors were encountered: