allow junk go.mod & go.sum files
This commit is contained in:
parent
34b61c9123
commit
a8f7adee19
1
argv.go
1
argv.go
|
@ -14,6 +14,7 @@ type args struct {
|
||||||
Notes bool `arg:"--metadata" help:"save as git metadata (notes)"`
|
Notes bool `arg:"--metadata" help:"save as git metadata (notes)"`
|
||||||
Restore bool `arg:"--restore" default:"true" help:"restore from git metadata"`
|
Restore bool `arg:"--restore" default:"true" help:"restore from git metadata"`
|
||||||
Force bool `arg:"--force" help:"remove the old one"`
|
Force bool `arg:"--force" help:"remove the old one"`
|
||||||
|
Pure bool `arg:"--pure" default:"false" help:"never leave go.* files unless things are perfect"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (args) Version() string {
|
func (args) Version() string {
|
||||||
|
|
4
exit.go
4
exit.go
|
@ -18,7 +18,9 @@ func badExit(check *gitpb.Repo, err error) {
|
||||||
log.DaemonMode(true)
|
log.DaemonMode(true)
|
||||||
log.Info("go-mod-clean failed: ", err, forge.GetGoSrc())
|
log.Info("go-mod-clean failed: ", err, forge.GetGoSrc())
|
||||||
if check != nil {
|
if check != nil {
|
||||||
eraseGoMod(check)
|
if argv.Pure {
|
||||||
|
eraseGoMod(check)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
os.Exit(-1)
|
os.Exit(-1)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue