diff --git a/package.yaml b/package.yaml index b224c3f6..5e87615b 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: restyler -version: 0.5.2.0 +version: 0.5.2.1 license: AGPL-3 language: GHC2021 diff --git a/restyler.cabal b/restyler.cabal index d6d8e3c7..a33da04d 100644 --- a/restyler.cabal +++ b/restyler.cabal @@ -5,7 +5,7 @@ cabal-version: 1.12 -- see: https://github.com/sol/hpack name: restyler -version: 0.5.2.0 +version: 0.5.2.1 license: AGPL-3 build-type: Simple diff --git a/src/Restyler/Monad/Git.hs b/src/Restyler/Monad/Git.hs index 8180ba18..6aaf6ef8 100644 --- a/src/Restyler/Monad/Git.hs +++ b/src/Restyler/Monad/Git.hs @@ -52,7 +52,12 @@ instance gitCommit msg paths = do runGit_ $ ["commit", "--message", msg, "--"] <> toList paths readGitChomp ["rev-parse", "HEAD"] - gitClean = runGit_ ["clean", "-d", "--force"] + gitClean = do + ec <- runGitExitCode ["clean", "-d", "--force"] + when (ec /= ExitSuccess) + $ logWarn + $ "git clean not successful" + :# ["exitCode" .= show @Text ec] gitResetHard ref = runGit_ ["reset", "--hard", ref] runGit_