Update snaps (fixes #29)

This commit is contained in:
Roey Darwish Dror
2018-06-14 13:24:52 +03:00
parent 7a4c5a913d
commit f2c487efcc
3 changed files with 26 additions and 5 deletions

View File

@@ -162,3 +162,13 @@ pub fn run_flatpak(flatpak: &PathBuf) -> Result<(), failure::Error> {
Ok(())
}
pub fn run_snap(sudo: &PathBuf, snap: &PathBuf) -> Result<(), failure::Error> {
Command::new(&sudo)
.args(&[snap.to_str().unwrap(), "refresh"])
.spawn()?
.wait()?
.check()?;
Ok(())
}