@@ -64,6 +64,7 @@ import System.Posix (getSymbolicLinkStatus, modificationTime)
64import System.Process
64import System.Process
66import Development.Placeholders
66import Development.Placeholders
67+import Obelisk.Command.Utils
68--TODO: Support symlinked thunk data
69--TODO: Support symlinked thunk data
69data ThunkData
70data ThunkData
@@ -510,12 +511,7 @@ packThunk thunkDir upstream = readThunk thunkDir >>= \case
511getThunkPtr :: FilePath -> String -> IO ThunkPtr
512getThunkPtr :: FilePath -> String -> IO ThunkPtr
512getThunkPtr thunkDir upstream = do
513getThunkPtr thunkDir upstream = do
513− --Check whether the working directory is clean
514+ checkGitCleanStatus thunkDir >>= \case
514− statusOutput <- readProcess "hub"
516− , "status", "--porcelain", "--ignored" ] ""
517− diffOutput <- readProcess "hub" [ "-C", thunkDir , "diff" ] ""
518− case null statusOutput && null diffOutput of
519 False -> do
515 False -> do
520 statusDebug <- readProcess "hub"
516 statusDebug <- readProcess "hub"
521 [ "-C", thunkDir, "status", "--ignored" ] ""
517 [ "-C", thunkDir, "status", "--ignored" ] ""