File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -42,24 +42,25 @@ runTest f =
4242 inBase = System.FilePath. takeBaseName inFile
4343
4444 System.Directory. copyFile inFile (dir </> inBase)
45+ testScript <- System.Directory. makeAbsolute " tests/fakeRepo.sh"
4546
46- System.Directory. copyFile " tests/fakeRepo.sh " (dir </> " fakeRepo.sh " )
47-
48- _ <- System.Process. readCreateProcess
49- (( System.Process. shell (dir </> " fakeRepo.sh " )) { System.Process. cwd = Just dir })
50- mempty
47+ _ <- System.Process. waitForProcess =<< System.Process. runProcess
48+ " bash "
49+ [testScript] ( Just dir)
50+ Nothing
51+ Nothing Nothing Nothing
5152
5253 replaceFile (dir </> inBase) " /tmp/nix-update-fetchgit-test" (Data.Text. pack dir)
5354
5455 System.Environment. setEnv " NIX_STATE_DIR" $ storeDir </> " state"
55- System.Environment. setEnv " NIX_STORE_DIR" $ storeDir
56+ System.Environment. setEnv " NIX_STORE_DIR" storeDir
5657
5758 -- work around race condition https://github.com/NixOS/nix/issues/2706
5859 System.Directory. createDirectoryIfMissing True $ storeDir </> " state/gcroots"
5960
6061 -- and another - error: SQLite database storeDir </> 'state/db/db.sqlite' is busy
6162 _ <- System.Process. readCreateProcess
62- (System.Process. shell ( " nix-store --init" ) )
63+ (System.Process. shell " nix-store --init" )
6364 mempty
6465
6566 let env = Env (const (Data.Text.IO. hPutStrLn System.IO. stderr)) [] [] Wet False
Original file line number Diff line number Diff line change 1- #! /bin/sh
1+ #! /usr/ bin/env bash
22
33# Prepares git repositories on the local machine that we will use for
44# testing.
You can’t perform that action at this time.
0 commit comments