Add reboot and shell ability in pause

This commit is contained in:
Roey Darwish Dror
2019-06-13 22:05:18 +03:00
parent 79febd78b5
commit a834a79f45
5 changed files with 46 additions and 8 deletions

View File

@@ -499,8 +499,16 @@ fn run() -> Result<(), Error> {
}
if env::var("TOPGRADE_KEEP_END").is_ok() {
println!("\nPress any key to continue");
pause();
print_info("\nPress R to reboot, S for shell or any other key to continue");
match get_char() {
's' | 'S' => {
run_shell();
}
'r' | 'R' => {
reboot();
}
_ => (),
}
}
if report.data().iter().all(|(_, succeeded)| *succeeded) {