Skip to content

Instantly share code, notes, and snippets.

@sblom
Last active July 26, 2022 19:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sblom/7951222 to your computer and use it in GitHub Desktop.
Save sblom/7951222 to your computer and use it in GitHub Desktop.
Crazy hack to extract the GitHub for Windows %PATH% modifications out of shell.ps1 for use in cmd.exe.
for /f "usebackq delims=*" %%p in (`powershell -ExecutionPolicy RemoteSigned -Command "& { . $env:LOCALAPPDATA\GitHub\shell.ps1 ; echo $env:path }"`) do set path=%%p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment