From 6c5afb8fe979f778808622f0ebe9435f56502ad3 Mon Sep 17 00:00:00 2001 From: Peter Mounce Date: Wed, 12 Oct 2016 14:02:26 +0100 Subject: [PATCH] Warn the user about required PATH entry ordering As discovered within #1919, the order of entries in the `PATH` matters, and is hard to diagnose when it's wrong. --- scripts/packages/chocolatey/chocolateyinstall.ps1.template | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/packages/chocolatey/chocolateyinstall.ps1.template b/scripts/packages/chocolatey/chocolateyinstall.ps1.template index 4d12ed270f6e5e..beadbd4a6399eb 100644 --- a/scripts/packages/chocolatey/chocolateyinstall.ps1.template +++ b/scripts/packages/chocolatey/chocolateyinstall.ps1.template @@ -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