-
Notifications
You must be signed in to change notification settings - Fork 849
Closed
Description
On a Windows system with no git on the system/user %PATH% and a git repository package in stack.yaml, stack (sometimes?) completely fails within the project folder.
$ cat stack.yaml
[...]
- location:
git: https://github.com/conklech/threepenny-gui.git
commit: b426b55bc34704b66da35b256c3e7505b044b636
$ stack build
Executable named git not found on path: ["C:\\ProgramData\\Oracle\\Java\\javapath","C:\\Windows\\system32","C:\\Windows","C:\\Windows\\System32\\Wbem","C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\","C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common","%SystemRoot%\\system32","%SystemRoot%","%SystemRoot%\\System32\\Wbem","%SYSTEMROOT%\\System32\\WindowsPowerShell\\v1.0\\","C:\\Users\\chris\\AppData\\Roaming\\local\\bin"]
$ stack exec -- echo "nothing"
Executable named git not found on path: ["C:\\ProgramData\\Oracle\\Java\\javapath","C:\\Windows\\system32","C:\\Windows","C:\\Windows\\System32\\Wbem","C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\","C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common","%SystemRoot%\\system32","%SystemRoot%","%SystemRoot%\\System32\\Wbem","%SYSTEMROOT%\\System32\\WindowsPowerShell\\v1.0\\","C:\\Users\\chris\\AppData\\Roaming\\local\\bin"]
$ cd ..
$ stack exec -- where git
Run from outside a project, using implicit global config
Using resolver: lts-2.20 from global config file: C:\Users\chris\AppData\Roaming\stack\global\stack.yaml
C:\Users\chris\AppData\Local\Programs\stack\i386-windows\git-2.4.5.1\cmd\git.exe
This condition is fragile. After adding git.exe to the %PATH% and running stack build (which succeeds), and then opening a new shell with the original %PATH%, stack functions normally again, even after stack clean. I don't know what the exact preconditions for the buggy behavior are.