윈도우 파워쉘에서는 명령어를 순차실행하는 && 명령어가 먹히지 않았다. 그래서 검색해보니 PowerShell 버전을 7 버전으로 업그레이드 해주면 된다고 해서 업그레이드를 한 과정을 정리해보았다.
PowerShell 터미널 오픈 후 하기 명령어 입력
iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI"
해당 명령어를 입력하면 PowerShell 7 버전 설치프로그램이 자동으로 다운로드 되고 열린다. 설치해주면 된다.
이후 VSCode 로 와서 커맨드 팔레트 창 (CTRL+SHIFT+P
) 을 띄운 후 Preferences: Open User Settings (JSON)
를 선택.
적당한 위치에
"terminal.integrated.profiles.windows": {
"PowerShell": null,
"PowerShell 7": {
"path": "C:\\Program Files\\PowerShell\\7\\pwsh.exe",
"args": [
//"-noexit",
//"-file",
//"${env:APPDATA}\PowerShell\my-init-script.ps1",
]
}
},
"terminal.integrated.defaultProfile.windows": "PowerShell 7",
해당 내용을 추가해주면 된다.