Strange `stack setup` behaviour when `DESTDIR` is set #1460
Comments
To clarify: Even if |
I don't think So in your particular case, during build, other makefiles get invoked which use |
We specified |
Sounds like we should just remove DESTDIR from the environment when installing GHC. |
That sounds like a good resolution to me! It should warn about unsetting the env var, incase the user is doing it intentionally. |
Fixed! Feel free to re-open if not. |
Calling
stack setup
, withDESTDIR
set fails since it will end up being installed in$DESTDIR$HOME/.stack/programs/x86_64-linux/ghc-7.10.2/
. This happened on a CI server that calledmake DESTDIR=$BUILD_DIR install
and relied on the fact that theinstall
target was calling other targets that eventually calledstack setup
.Here's what happens on Debian 8.2 for a user with
HOME=/var/lib/buildkite-agent
:Note that the install ends up in
$DESTDIR$HOME
which here is/tmp/test/var/lib/buildkite-agent
.(This was solved by changing the build to be
make && make DESTDIR=$BUILD_DIR install
so thatDESTDIR
is only set for theinstall
target.)The text was updated successfully, but these errors were encountered: