@@ -86,7 +86,9 @@ main = do
8686 let shelly_ = void . shellyOb verbosity
8787
8888 inTmp :: (Shelly.FilePath -> Sh a) -> IO ()
89− inTmp f = shelly_ . withSystemTempDirectory "test" $ (chdir <*> f) . fromString
89+ inTmp f = withTmp (chdir <*> f)
90+
91+ withTmp f = shelly_ . withSystemTempDirectory "test" $ f . fromString
9092
9193 inTmpObInit f = inTmp $ \dir -> do
9294 run_ "cp" ["-a", fromString $ initCache <> "/.", toTextIgnore dir]
@@ -181,12 +183,12 @@ main = do
181183 assertRevEQ eu eupu
182184 assertRevNE e eu
183185
184− it "unpacks the correct branch" $ inTmp $ \dir -> do
186+ it "unpacks the correct branch" $ withTmp $ \dir -> do
185187 let branch = "master"
186188 run_ "git" ["clone", "https://github.com/reflex-frp/reflex.git", toTextIgnore dir, "--branch", branch]
187189 run_ "ob" ["thunk", "pack", toTextIgnore dir]
188190 run_ "ob" ["thunk", "unpack", toTextIgnore dir]
189− branch' <- run "git" ["rev-parse", "--abbrev-ref", "HEAD"]
191+ branch' <- chdir dir $ run "git" ["rev-parse", "--abbrev-ref", "HEAD"]
190192 liftIO $ assertEqual "" branch (T.strip branch')
191193
192194 it "can pack and unpack plain git repos" $ do