본문 바로가기

TOOL

[VSCode] Git Bash 사라짐

728x90

fnm를 설치하여 한 프로젝트를 로컬에 셋팅하던 와중에 VSC에 Bash창이 날라가버렸다...

아마도 아래 명령어 때문인거 같은데

eval "$(fnm env --use-on-cd --shell bash)"

 

환경변수 설정을 하려다가 더 꼬일꺼 같아서 VSC 의 settings.json 파일에 bash 경로를 정확하게 설정해 볼까한다.

 

우선 내 로컬에서 bash가 어디에 설치되어있는지 봐야하는데, 커멘드 라인에서 위치를 찾아보면

which bash
/usr/bin/bash

로 나오므로 정확하게 알수 없다..

보통 git을 설치하게 되면 C:\\Programs 폴더에 설치되므로 참고!

나는 D 드라이브에 program이라는 폴더를 만들어서 설치했었다. 

{
"terminal.integrated.profiles.windows": {
    "PowerShell": {
      "source": "PowerShell",
      "icon": "terminal-powershell"
    },
    "Command Prompt": {
      "path": ["${env:windir}\\Sysnative\\cmd.exe", "${env:windir}\\System32\\cmd.exe"],
      "args": [],
      "icon": "terminal-cmd"
    },
    "Git Bash": {
      "path": ["D:\\program\\Git\\bin\\bash.exe"],
      "source": "Git Bash"
    }
  },
  "terminal.integrated.defaultProfile.windows": "Git Bash",
}

 

위와 같이 settings에 내용을 추가해주고 VSCode 프로그램을 껐다가 다시 켜주면 터미널에 있는걸 확인할 수 있다.

😊