Remove key file when migration fails.
Signed-off-by: David Calavera <david.calavera@gmail.com> Upstream-commit: 07c45e499d5dc04b009d522ebbdcbfebe7e7aba9 Component: engine
This commit is contained in:
@ -100,6 +100,7 @@ func migrateKey() (err error) {
|
||||
err = os.Remove(oldPath)
|
||||
} else {
|
||||
logrus.Warnf("Key migration failed, key file not removed at %s", oldPath)
|
||||
os.Remove(newPath)
|
||||
}
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user