From 09bdca2c162d8c1f33d3ffbd5ab926ac825841aa Mon Sep 17 00:00:00 2001 From: Twig6943 <119701717+Twig6943@users.noreply.github.com> Date: Mon, 26 Jan 2026 20:25:50 +0300 Subject: [PATCH 1/2] Update flatpak.rs --- src/backends/flatpak.rs | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/backends/flatpak.rs b/src/backends/flatpak.rs index d084553..fde9b2b 100644 --- a/src/backends/flatpak.rs +++ b/src/backends/flatpak.rs @@ -98,7 +98,7 @@ impl Backend for Flatpak { run_command( ["flatpak", "install"] .into_iter() - .chain(Some("--assumeyes").filter(|_| no_confirm)) + .chain(Some("-y").filter(|_| no_confirm)) .map(|x| x.to_string()) .chain(match installation.as_str() { "user" => Some("--user".to_string()), @@ -136,7 +136,7 @@ impl Backend for Flatpak { run_command( ["flatpak", "uninstall"] .into_iter() - .chain(Some("--assumeyes").filter(|_| no_confirm)) + .chain(Some("-y").filter(|_| no_confirm)) .map(|x| x.to_string()) .chain(match installation.as_str() { "user" => Some("--user".to_string()), @@ -173,7 +173,7 @@ impl Backend for Flatpak { run_command( ["flatpak", "update"] .into_iter() - .chain(Some("--assumeyes").filter(|_| no_confirm)) + .chain(Some("-y").filter(|_| no_confirm)) .map(|x| x.to_string()) .chain(match installation.as_str() { "user" => Some("--user".to_string()), @@ -192,7 +192,7 @@ impl Backend for Flatpak { run_command( ["flatpak", "update"] .into_iter() - .chain(Some("--assumeyes").filter(|_| no_confirm)), + .chain(Some("-y").filter(|_| no_confirm)), Perms::Same, ) } @@ -206,15 +206,12 @@ impl Backend for Flatpak { fn get_installed_repos(_: &Self::Config) -> Result> { let repos = run_command_for_stdout( ["flatpak", "remotes", "--columns", "options,name,url"], - Perms::Same, + Perms::Sudo, 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]; @@ -243,7 +240,7 @@ impl Backend for Flatpak { run_command( ["flatpak", "remote-add"] .into_iter() - .chain(Some("--assumeyes").filter(|_| no_confirm)) + .chain(Some("-y").filter(|_| no_confirm)) .map(ToString::to_string) .chain(match installation { "user" => Some("--user".to_string()), @@ -258,7 +255,7 @@ impl Backend for Flatpak { .ok_or(eyre!("flatpak repos must have the \"url\" option set"))? .to_string(), ]), - Perms::Same, + Perms::Sudo, )? } @@ -274,7 +271,7 @@ impl Backend for Flatpak { run_command( ["flatpak", "remote-delete"] .into_iter() - .chain(Some("--assumeyes").filter(|_| no_confirm)) + .chain(Some("-y").filter(|_| no_confirm)) .map(ToString::to_string) .chain(match installation { "user" => Some("--user".to_string()), @@ -282,7 +279,7 @@ impl Backend for Flatpak { x => Some(format!("--installation={x}")), }) .chain([name.to_string()]), - Perms::Same, + Perms::Sudo, )? } From bee3ceee87f170c5eb847f4ce28bdff87366c33c Mon Sep 17 00:00:00 2001 From: Twig6943 <119701717+Twig6943@users.noreply.github.com> Date: Mon, 26 Jan 2026 20:26:53 +0300 Subject: [PATCH 2/2] Update flatpak.rs --- src/backends/flatpak.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/backends/flatpak.rs b/src/backends/flatpak.rs index fde9b2b..0ab4994 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, )? }