diff options
Diffstat (limited to 'init.go')
| -rw-r--r-- | init.go | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -3,6 +3,7 @@ package forgepb import ( + "errors" "os" "path/filepath" @@ -74,7 +75,12 @@ func initFromConfig(cfg *ForgeConfigs) *Forge { // save patchsets here? } else { if err := config.LoadFile(f.Patchsets, f.Config.PatchPB); err != nil { - log.Info("forge.Init() load patches failed", err) + if errors.Is(err, os.ErrNotExist) { + log.Info("forge.Init() making new patches file", f.Config.PatchPB) + f.SavePatchsets() + } else { + log.Info("forge.Init() load patches failed", err) + } } } |
