Skip to content

Commit

Permalink
Warn the user about required PATH entry ordering
Browse files Browse the repository at this point in the history
As discovered within bazelbuild#1919, the order of entries in the `PATH` matters, and is hard to diagnose when it's wrong.
  • Loading branch information
petemounce authored and Peter Mounce committed Oct 13, 2016
1 parent 7b825b8 commit 5f6ee64
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/packages/chocolatey/chocolateyinstall.ps1.template
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ ps_var_addToMsysPath = (ps_var_packageDir -replace 'c:\\','/c/') -replace '\\','
write-host @"
bazel installed to ps_var_packageDir

To use it in powershell or cmd, you should ensure your PATH environment variable contains
ps_var_(ps_var_msys2Path)\usr\bin
BEFORE both
c:\windows\system32 (because bash-on-windows' bash.exe will be found here, if it's installed)
any references to msysgit (like c:\program files (x86)\git\bin or c:\program files (x86)\git\cmd) (because git's vendored version of msys2 will interfere with the real msys2)

To use it in msys2, you should add that to your msys2 PATH:
export PATH=ps_var_(ps_var_addToMsysPath):escape_charps_var_PATH

Expand Down

0 comments on commit 5f6ee64

Please sign in to comment.