mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #15273 from calavera/remove_new_key_path_on_error
Remove key file when migration fails.
This commit is contained in:
commit
40bd10dc95
1 changed files with 1 additions and 0 deletions
|
@ -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)
|
||||
}
|
||||
}()
|
||||
|
||||
|
|
Loading…
Reference in a new issue