Skip to content

Commit 385332d

Browse files
committed
Fix 443-specify-path integration test on Windows
1 parent 88d20ce commit 385332d

File tree

1 file changed

+7
-4
lines changed
  • test/integration/tests/443-specify-path

1 file changed

+7
-4
lines changed
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,30 @@
11
import StackTest
22
import System.Directory
33
import System.FilePath
4+
import System.Info (os)
45

56
main :: IO ()
67
main = do
8+
let ext = if os == "mingw32" then ".exe" else ""
9+
710
-- install in relative path
811
createDirectory "bin"
912
stack ["--local-bin-path", "./bin", "install" , "happy"]
10-
doesExist "./bin/happy"
13+
doesExist ("./bin/happy" ++ ext)
1114

1215
-- Default install
1316
-- This seems to fail due to direcory being cleaned up,
1417
-- a manual test of the default stack install is required
1518
-- defaultDir <- getAppUserDataDirectory "local"
1619
-- stack ["install", "happy"]
17-
-- doesExist (defaultDir ++ "/bin/happy")
20+
-- doesExist (defaultDir ++ "/bin/happy" ++ ext)
1821

1922
-- install in current dir
2023
stack ["--local-bin-path", ".", "install", "happy" ]
21-
doesExist "happy"
24+
doesExist ("happy" ++ ext)
2225

2326
-- install in absolute path
2427
tmpDirectory <- fmap (</> "absolute-bin") getCurrentDirectory
2528
createDirectory tmpDirectory
2629
stack ["--local-bin-path", tmpDirectory, "install", "happy" ]
27-
doesExist (tmpDirectory </> "happy")
30+
doesExist (tmpDirectory </> ("happy" ++ ext))

0 commit comments

Comments
 (0)