@@ -195,11 +195,14 @@ main = do
195195 it "works with default impl" $ inTmp $ \_ -> runOb ["init"]
196196 it "works with master branch impl" $ inTmp $ \_ -> runOb ["init", "--branch", "master"]
197197 it "works with symlink" $ inTmp $ \_ -> runOb ["init", "--symlink", toTextIgnore obeliskImplDirty]
198− it "doesn't silently overwrite existing files" $ withSystemTempDirectory "ob-init λ" $ \dir -> do
199− let p force = (System.Process.proc ob $ "--no-handoff" : "-v" : "init" : ["--force"|force]) { cwd = Just dir }
200− (ExitSuccess, _, _) <- readCreateProcessWithExitCode (p False) ""
201− (ExitFailure _, _, _) <- readCreateProcessWithExitCode (p False) ""
202− (ExitSuccess, _, _) <- readCreateProcessWithExitCode (p True) ""
198+ it "doesn't silently overwrite existing files" $ inTmp $ \dir -> do
199+ let p force = errExit False $ do
200+ run_ ob $ "--no-handoff" : "-v" : "init" : ["--force"|force]
201+ (== 0) <$> lastExitCode
202+
203+ True <- p False
204+ False <- p False
205+ True <- p True
203206 pure ()
204207
205208 it "doesn't create anything when given an invalid impl" $ inTmp $ \tmp -> do
@@ -279,7 +282,7 @@ main = do
279282
280283 it "can pack and unpack plain git repos" $
281284 shelly_ $ withSystemTempDirectory "git-repo" $ \dir -> do
282− let repo = toTextIgnore $ dir </> ("repo" :: String)
285+ let repo = toTextIgnore $ dir </> ("repo" :: FilePath)
283286 run_ gitPath ["clone", "https://github.com/haskell/process.git", repo]
284287 origHash <- chdir (fromText repo) revParseHead
285288