Update Flatpak (fixes #28)
This commit is contained in:
@@ -171,6 +171,11 @@ fn run() -> Result<(), Error> {
|
||||
run_rustup(&rustup).report("rustup", &mut reports);
|
||||
}
|
||||
|
||||
if let Ok(flatpak) = which("flatpak") {
|
||||
terminal.print_separator("Flatpak");
|
||||
run_flatpak(&flatpak).report("Flatpak", &mut reports);
|
||||
}
|
||||
|
||||
let cargo_upgrade = home_path(".cargo/bin/cargo-install-update");
|
||||
if cargo_upgrade.exists() {
|
||||
terminal.print_separator("Cargo");
|
||||
|
||||
10
src/steps.rs
10
src/steps.rs
@@ -152,3 +152,13 @@ pub fn run_custom_command(command: &str) -> Result<(), failure::Error> {
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn run_flatpak(flatpak: &PathBuf) -> Result<(), failure::Error> {
|
||||
Command::new(&flatpak)
|
||||
.arg("update")
|
||||
.spawn()?
|
||||
.wait()?
|
||||
.check()?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user