summaryrefslogtreecommitdiff
path: root/exit.go
diff options
context:
space:
mode:
Diffstat (limited to 'exit.go')
-rw-r--r--exit.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/exit.go b/exit.go
index 4664fda..0f34ce3 100644
--- a/exit.go
+++ b/exit.go
@@ -18,7 +18,9 @@ func badExit(check *gitpb.Repo, err error) {
log.DaemonMode(true)
log.Info("go-mod-clean failed: ", err, forge.GetGoSrc())
if check != nil {
- eraseGoMod(check)
+ if argv.Pure {
+ eraseGoMod(check)
+ }
}
os.Exit(-1)
}