try to restore first

This commit is contained in:
Jeff Carr 2024-12-13 13:52:35 -06:00
parent 86f06c8419
commit 02bbd75ce1
1 changed files with 3 additions and 2 deletions

View File

@ -40,9 +40,10 @@ func main() {
// skip restore if --force
if !argv.Force {
cname := check.GetCurrentBranchName()
// try to restore from the git metadata
if err := check.AutogenRestore(); err != nil {
badExit(err)
if err := check.AutogenRestore(cname); err != nil {
// ignore errors here
}
if err := check.ValidGoSum(); err == nil {
okExit("go.mod and go.sum were restored ok")