Open sgraf812 opened 6 years ago
Curious! What version of stack are you on? Perhaps try a newer one? That flag is literally only used in this one spot: https://github.com/commercialhaskell/stack/blob/master/src/Stack/Setup.hs#L304
Note that there is no mention of ACLOCAL_PATH
in the entirety of stack.
As you can see, it just disables inserting into the environment map. So, no idea why that would be. Unfortunately, I do not have straightforward access to a windows environment with stack. Hopefully a windows user can dig into the code and work out what's going on, put up a fix. Maybe that person can be you! Contributions appreciated!
I updated the issue with the version I used. Is the place you mentioned the only one where stack exec
prepares the environment in which to execute its command?
Note that my first sentence was a bit misleading:
This issue seems to be independent of passing --no-ghc-package-path
or not.
After a little digging, it seems that /etc/profile
doesn't seem to be sourced for stack exec
. echo $MSYS2_PATH
has a value in e.g. Git Bash but not in stack exec
.
Ohh, I misread. Ok, yeah, that probably has something to do with the mingw setup or something like that. Guessing that git bash is probably using a different mingw than the one installed by stack. I'm not sure really how that part of things works.
As I found out in this Phabricator thread,
stack exec [--no-ghc-package-path] bash
doesn't set$ACLOCAL_PATH
. I'm not sure why this is. When starting a regular mingw64 session or Git Bash (evenstack exec mintty
and choosing mingw64), the paths are set correctly.Steps to reproduce
stack exec bash
on a Windows machine (AFAICT any stack config will do)ehco $ACLOCAL_PATH
is empty