save: Restore the screen before overwriteFile() is left (#2967)
...otherwise there is no screen anymore to draw a possible error message.
This commit is contained in:
parent
db6d4f5461
commit
db5fcf11a9
1 changed files with 1 additions and 1 deletions
|
@ -79,10 +79,10 @@ func overwriteFile(name string, enc encoding.Encoding, fn func(io.Writer) error,
|
|||
if withSudo {
|
||||
// wait for dd to finish and restart the screen if we used sudo
|
||||
err := cmd.Wait()
|
||||
screen.TempStart(screenb)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
screen.TempStart(screenb)
|
||||
}
|
||||
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue