Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode keeps opening powershell on start even though Git Bash is set as default

I have set my integrated default terminal in VSCode as Git Bash but whenever I launch VSCode, powershell pops up instead of bash. It does not, however, change the default terminal setting but it is irritating. I have tried removing the profile of powershell from settings but that seems to do nothing. Why is this happening?

like image 973
Abhishek Ghadge Avatar asked May 16 '21 03:05

Abhishek Ghadge


People also ask

Why does VS Code run in PowerShell?

Visual Studio Code (VS Code) is a cross-platform script editor by Microsoft. Together with the PowerShell extension, it provides a rich and interactive script editing experience, making it easier to write reliable PowerShell scripts.


3 Answers

Make sure you upgrade to vscode v1.60.1 - there is a fix in that point release for this issue.


See Select Default Profile do not actually open gitbash. After relaunch, on startup, it just keeps open PowerShell.

The same thing was happening to me and the referred to fix in the Insiders' Build 05/14/2021 did in fact fix it for me. In the meantime, opening another terminal does always open git bash for me - but that is a pain.

like image 68
Mark Avatar answered Oct 17 '22 02:10

Mark


This worked for me:

{
    "terminal.integrated.defaultProfile.windows": "Git Bash",
    "terminal.integrated.profiles.windows": {
        "PowerShell": null,
        "Git Bash": {
            "source": "Git Bash"
        },
        "Windows PowerShell": null
    },
    "terminal.integrated.automationShell.windows": "Git Bash",
    "powershell.enableProfileLoading": false,
    "powershell.integratedConsole.showOnStartup": false
}
like image 2
Abhishek Ghadge Avatar answered Oct 17 '22 03:10

Abhishek Ghadge


I managed to find a workaround without using the Insider's Build that may work for some of you : I removed all profiles safe for the one I want, and reinstalled VS Code. Then it somehow started using the right terminal on startup. I don't know if this works without disabling all other profiles though.

like image 1
SeizeD Avatar answered Oct 17 '22 02:10

SeizeD