Skip to content

Instantly share code, notes, and snippets.

@mahldcat
Created January 15, 2025 14:54
Show Gist options
  • Select an option

  • Save mahldcat/ddd9da9ed4c322d9ee11a78e78270f5d to your computer and use it in GitHub Desktop.

Select an option

Save mahldcat/ddd9da9ed4c322d9ee11a78e78270f5d to your computer and use it in GitHub Desktop.
Powershell replacement for the VSCode's code.cmd (usually found in C:\Users\$($env:USERNAME)\AppData\Local\Programs\Microsoft VS Code\bin
$ErrorActionPreference = "Stop"
$env:VSCODE_DEV = $null
$env:ELECTRON_RUN_AS_NODE = "1"
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Definition
& "$scriptDir\..\Code.exe" "$scriptDir\..\resources\app\out\cli.js" @args
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment