If you did not have the VS Code (Insiders) installer update your path (or you where not prompted due to installing via a package manager like winget
), then you can use the below code to fix that.
This will update your systems PATH environment variable to include code
or code-insiders
.
- Execute the code below from within a VS Code (Insiders) PowerShell prompt.
- The script will output the code you then need to copy, paste and execute in a PowerShell CLI with elevated privilges.
switch((Test-Path "$Env:VSCODE_GIT_ASKPASS_NODE") -and ($Env:Path -split ';' -contains "$(Split-Path $Env:VSCODE_GIT_ASKPASS_NODE)\bin")) {$true{$codePath=Split-Path $Env:VSCODE_GIT_ASKPASS_NODE;Write-Host -ForegroundColor Green "`nExecute the below command (yellow text) from an PowerShell prompt with ELEVATED privileges`n"; Write-Host -ForegroundColor Yellow "`$Env:Path;[Environment]::SetEnvironmentVariable(`"Path`", `$Env:Path + `";$codePath\bin`", `"Machine`");`$Env:Path`n"} $false {Write-Host -ForegroundColor Red '