Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
save: Restore the screen if failed to start sudo
Similarly to the crash fixed by #2967, which happens if sudo failed, a crash also happens when sudo even fails to start. The reason for the crash is also similar: nil dereference of screen.Screen caused by the fact that we do not restore temporarily disabled screen. To reproduce this crash, set the `sucmd` option to some non-existing command, e.g. `aaa`, and try to save a file with root privileges.
- Loading branch information