Commit 65c37dbd authored by Duncan Coutts's avatar Duncan Coutts
Browse files

When launching setup in another dir we must use an adjusted path

The path to the binary we're running must be accessable from
that other directory. The fix is to use currentDir </> setup
parent c5641fca
......@@ -54,7 +54,7 @@ import Distribution.Text
import Distribution.Verbosity
( Verbosity )
import System.Directory ( doesFileExist, getModificationTime )
import System.Directory ( doesFileExist, getModificationTime, getCurrentDirectory )
import System.FilePath ( (</>), (<.>) )
import System.IO.Error ( isDoesNotExistError )
import System.IO ( Handle )
......@@ -281,7 +281,8 @@ externalSetupMethod verbosity options pkg bt mkargs = do
Just logHandle -> do
info verbosity $ unwords (setupProgFile : args)
info verbosity $ "Redirecting build log to " ++ show logHandle
process <- runProcess setupProgFile args
currentDir <- getCurrentDirectory
process <- runProcess (currentDir </> setupProgFile) args
(useWorkingDir options) Nothing
Nothing (Just logHandle) (Just logHandle)
exitCode <- waitForProcess process
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment