Skip to content

Commit

Permalink
Try absolute path
Browse files Browse the repository at this point in the history
  • Loading branch information
mpickering committed Nov 8, 2023
1 parent ec12c0a commit be88709
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cabal-testsuite/PackageTests/ExternalCommand/cabal.test.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Test.Cabal.Prelude
import qualified System.Process as Process
import Control.Concurrent (threadDelay)
import System.Directory (removeFile)
import System.Directory (removeFile, canonicalizePath)
import Control.Exception (catch, throwIO)
import System.IO.Error (isDoesNotExistError)
import qualified Data.Time.Clock as Time
Expand All @@ -12,7 +12,8 @@ import System.Environment
main = do
cabalTest $ do
res <- cabalWithStdin "v2-build" ["all"] ""
exe_path <- withPlan $ planExePath "setup-test" "cabal-aaaa"
rel_exe_path <- withPlan $ planExePath "setup-test" "cabal-aaaa"
exe_path <- liftIO $ canonicalizePath rel_exe_path
env <- getTestEnv
path <- liftIO $ getEnv "PATH"
let newpath = takeDirectory exe_path ++ ":" ++ path
Expand Down

0 comments on commit be88709

Please sign in to comment.