Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix installing from custom folder on Linux (#1058) #1066

Merged
merged 1 commit into from

2 participants

Michael Snoyman Johan Tibell
Michael Snoyman

Not sure if this is the right branch to send a pull request to, please let me know if it should go elsewhere next time.

Johan Tibell tibbe merged commit 48082b9 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 13, 2012
  1. Michael Snoyman
This page is out of date. Refresh to see the latest.
Showing with 9 additions and 2 deletions.
  1. +9 −2 cabal-install/Distribution/Client/SetupWrapper.hs
11 cabal-install/Distribution/Client/SetupWrapper.hs
View
@@ -70,7 +70,7 @@ import Distribution.Verbosity
import Distribution.Compat.Exception
( catchIO )
-import System.Directory ( doesFileExist )
+import System.Directory ( doesFileExist, canonicalizePath )
import System.FilePath ( (</>), (<.>) )
import System.IO ( Handle, hPutStr )
import System.Exit ( ExitCode(..), exitWith )
@@ -382,7 +382,14 @@ externalSetupMethod verbosity options pkg bt mkargs = do
Nothing -> return ()
Just logHandle -> info verbosity $ "Redirecting build log to "
++ show logHandle
- process <- runProcess path args
+
+ -- Since useWorkingDir can change the relative path, the path argument must
+ -- be turned into an absolute path. On some systems, runProcess will take
+ -- path as relative to the new working directory instead of the current
+ -- working directory.
+ path' <- canonicalizePath path
+
+ process <- runProcess path' args
(useWorkingDir options) Nothing
Nothing (useLoggingHandle options) (useLoggingHandle options)
exitCode <- waitForProcess process
Something went wrong with that request. Please try again.