Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 7a4c5a9

Browse files
author
Roey Darwish Dror
committed
Update Flatpak (fixes #28)
1 parent 544d87d commit 7a4c5a9

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/main.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,11 @@ fn run() -> Result<(), Error> {
171171
run_rustup(&rustup).report("rustup", &mut reports);
172172
}
173173

174+
if let Ok(flatpak) = which("flatpak") {
175+
terminal.print_separator("Flatpak");
176+
run_flatpak(&flatpak).report("Flatpak", &mut reports);
177+
}
178+
174179
let cargo_upgrade = home_path(".cargo/bin/cargo-install-update");
175180
if cargo_upgrade.exists() {
176181
terminal.print_separator("Cargo");

src/steps.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,13 @@ pub fn run_custom_command(command: &str) -> Result<(), failure::Error> {
152152

153153
Ok(())
154154
}
155+
156+
pub fn run_flatpak(flatpak: &PathBuf) -> Result<(), failure::Error> {
157+
Command::new(&flatpak)
158+
.arg("update")
159+
.spawn()?
160+
.wait()?
161+
.check()?;
162+
163+
Ok(())
164+
}

0 commit comments

Comments
 (0)