@@ -639,6 +639,7 @@ setThunk' noTrail branch thunkDir = checkThunkDirectory thunkDir >> readThunk th
639639 (exitCode, _) <- gitLsRemoteExitCode repository branch
640640 case exitCode of
641641 ExitSuccess -> do
642+ -- TODO: Accomplish this without unpacking
642643 _ <- unpackThunk' noTrail thunkDir
643644 callProcessAndLogOutput (Debug, Error) $ gitProc thunkDir ["checkout", branch]
644645 _ <- packThunk' noTrail thunkDir
@@ -646,10 +647,7 @@ setThunk' noTrail branch thunkDir = checkThunkDirectory thunkDir >> readThunk th
646647 ExitFailure errNum -> failWith $ T.pack $ if errNum == 2
647648 then "Error: branch not found"
648649 else ("Error Code: " <> show errNum <> "issue checking out the desired branch")
649− Right (ThunkData_Checkout _) -> do
650− callProcessAndLogOutput (Debug, Error) $ gitProc thunkDir ["checkout", branch]
651− _ <- packThunk' noTrail thunkDir
652− updateThunkToLatest thunkDir
650+ Right (ThunkData_Checkout _) -> failWith $ T.pack $ "thunk located at " <> (show thunkDir) <> " is unpacked. Use ob thunk pack on the desired directory and then try ob thunk set again."
653651
654652getThunkPtr :: MonadObelisk m => FilePath -> m ThunkPtr
655653getThunkPtr = getThunkPtr' True