fix: add interactive=false handling in remove command

This commit is contained in:
2025-03-26 10:22:56 +03:00
parent fff8b777fe
commit bd79d56776
4 changed files with 46 additions and 3 deletions

View File

@ -169,7 +169,10 @@ func RemoveCmd() *cli.Command {
os.Exit(1)
}
err := mgr.Remove(nil, c.Args().Slice()...)
err := mgr.Remove(&manager.Opts{
AsRoot: true,
NoConfirm: !c.Bool("interactive"),
}, c.Args().Slice()...)
if err != nil {
slog.Error(gotext.Get("Error removing packages"), "err", err)
os.Exit(1)