1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-05-12 23:32:50 -04:00

refactor(sysUpdate): Include the refresh flag in Fedora upgrade cmd

This commit is contained in:
purian23
2026-05-04 11:06:26 -04:00
parent 19c561da14
commit 5b507136e3
@@ -43,13 +43,13 @@ func (b dnfBackend) CheckUpdates(ctx context.Context) ([]Package, error) {
func (b dnfBackend) Upgrade(ctx context.Context, opts UpgradeOptions, onLine func(string)) error { func (b dnfBackend) Upgrade(ctx context.Context, opts UpgradeOptions, onLine func(string)) error {
if opts.DryRun { if opts.DryRun {
return Run(ctx, []string{b.bin, "upgrade", "--assumeno"}, RunOptions{OnLine: onLine}) return Run(ctx, []string{b.bin, "upgrade", "--refresh", "--assumeno"}, RunOptions{OnLine: onLine})
} }
names := pickTargetNames(opts.Targets, b.bin, true) names := pickTargetNames(opts.Targets, b.bin, true)
if len(names) == 0 { if len(names) == 0 {
return nil return nil
} }
argv := append([]string{"pkexec", b.bin, "upgrade", "-y"}, names...) argv := append([]string{"pkexec", b.bin, "upgrade", "--refresh", "-y"}, names...)
return Run(ctx, argv, RunOptions{OnLine: onLine}) return Run(ctx, argv, RunOptions{OnLine: onLine})
} }