refactor(gitpb): Modify deleteProtobufFile to remove file instead of exiting
This commit is contained in:
parent
aef107af0d
commit
72b5864000
|
@ -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() {
|
||||||
|
|
Loading…
Reference in New Issue