Skip to content

Commit 122c330

Browse files
committed
Fix windows build
- findExecutable sh - Use single quotes for cabal exec
1 parent 87d55fb commit 122c330

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

cabal-install/tests/IntegrationTests.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import Control.Concurrent.Async (withAsync, wait)
2727
import Control.Exception (bracket)
2828
import System.Directory
2929
( canonicalizePath
30+
, findExecutable
3031
, getDirectoryContents
3132
, getTemporaryDirectory
3233
, doesDirectoryExist
@@ -195,7 +196,8 @@ runTestCase assertResult tc = do
195196
bracket createWorkDirectory (removeWorkDirectory doRemove) $ \workDirectory -> do
196197
-- Run
197198
let scriptDirectory = workDirectory </> tcShouldX tc
198-
testResult <- run scriptDirectory "/bin/sh" [ "-e", tcName tc]
199+
Just sh <- findExecutable "sh"
200+
testResult <- run scriptDirectory sh [ "-e", tcName tc]
199201
-- Assert that we got what we expected
200202
assertResult testResult
201203
mustMatch testResult "stdout" (trStdOut testResult) (tcStdOutPath tc)

cabal-install/tests/IntegrationTests/exec/should_run/configures_cabal_to_use_sandbox.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ $GHC_PKG list | grep -v "my-0.1"
1111

1212
# When run inside 'cabal-exec' the 'sandbox hc-pkg list' sub-command
1313
# should find the library.
14-
cabal exec sh -- -c "cd subdir && $CABAL sandbox hc-pkg list" | grep "my-0.1"
14+
cabal exec sh -- -c 'cd subdir && $CABAL sandbox hc-pkg list' | grep "my-0.1"

0 commit comments

Comments
 (0)