Don't pass relative paths to sudo (fixes #43)

This commit is contained in:
Roey Darwish Dror
2018-07-01 20:24:01 +03:00
parent 3de4b2c5b1
commit ad9cad0525
2 changed files with 9 additions and 9 deletions

View File

@@ -231,9 +231,9 @@ fn run() -> Result<(), Error> {
}
if let Some(sudo) = &sudo {
if let Some(_) = utils::which("needrestart") {
if let Some(needrestart) = utils::which("needrestart") {
terminal.print_separator("Check for needed restarts");
linux::run_needrestart(&sudo).report("Restarts", &mut reports);
linux::run_needrestart(&sudo, &needrestart).report("Restarts", &mut reports);
}
}
}