diff --git a/src/backends/flatpak.rs b/src/backends/flatpak.rs index 2cab39e..d084553 100644 --- a/src/backends/flatpak.rs +++ b/src/backends/flatpak.rs @@ -206,12 +206,15 @@ impl Backend for Flatpak { fn get_installed_repos(_: &Self::Config) -> Result> { let repos = run_command_for_stdout( ["flatpak", "remotes", "--columns", "options,name,url"], - Perms::Sudo, + Perms::Same, StdErr::Show, )?; let repos = repos .lines() + // if there are no remotes an empty line is still returned + // so we filter out empty lines + .filter(|x| !x.is_empty()) .map(|line| { let parts = line.split_whitespace().collect::>(); let installation = parts[0].split(",").collect::>()[0]; @@ -255,7 +258,7 @@ impl Backend for Flatpak { .ok_or(eyre!("flatpak repos must have the \"url\" option set"))? .to_string(), ]), - Perms::Sudo, + Perms::Same, )? } @@ -279,7 +282,7 @@ impl Backend for Flatpak { x => Some(format!("--installation={x}")), }) .chain([name.to_string()]), - Perms::Sudo, + Perms::Same, )? } diff --git a/src/backends/yarn.rs b/src/backends/yarn.rs index 924a5c0..3a09517 100644 --- a/src/backends/yarn.rs +++ b/src/backends/yarn.rs @@ -60,7 +60,6 @@ impl Backend for Yarn { let package_file = Path::new(&dir).join("package.json"); if !package_file.exists() { - dbg!(&package_file); return Ok(BTreeMap::new()); }