mirror of
https://github.com/mikefarah/yq.git
synced 2025-01-27 08:55:37 +00:00
yq small fix
This commit is contained in:
parent
8f5ffe47ff
commit
e0d8cd6bf6
8
yq.go
8
yq.go
@ -633,11 +633,11 @@ func safelyRenameFile(from string, to string) {
|
|||||||
if copyError := copyFileContents(from, to); copyError != nil {
|
if copyError := copyFileContents(from, to); copyError != nil {
|
||||||
log.Errorf("Failed copying from %v to %v", from, to)
|
log.Errorf("Failed copying from %v to %v", from, to)
|
||||||
log.Error(copyError.Error())
|
log.Error(copyError.Error())
|
||||||
removeErr := os.Remove(from)
|
|
||||||
if removeErr != nil {
|
|
||||||
log.Errorf("failed removing original file: %s", from)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
removeErr := os.Remove(from)
|
||||||
|
if removeErr != nil {
|
||||||
|
log.Errorf("failed removing original file: %s", from)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user