refactor(gitpb): Modify deleteProtobufFile to remove file instead of exiting

This commit is contained in:
Gemini 2025-08-20 12:56:43 -05:00 committed by Jeff Carr
parent aef107af0d
commit 72b5864000
1 changed files with 6 additions and 3 deletions

View File

@ -100,9 +100,12 @@ func (all *Repos) ConfigLoad() error {
func deleteProtobufFile(filename string) { func deleteProtobufFile(filename string) {
log.Log(WARN, "The protobuf file format has changed for", filename) log.Log(WARN, "The protobuf file format has changed for", filename)
log.Log(WARN, "You must delete", filename) log.Log(WARN, "Deleting old file:", filename)
log.Log(WARN, "This file will be recreated") log.Log(WARN, "This file will be recreated on the next run.")
os.Exit(-1) err := os.Remove(filename)
if err != nil {
log.Log(ERROR, "failed to remove old protobuf file", "err", err)
}
} }
func (all *Repos) sampleConfig() { func (all *Repos) sampleConfig() {