mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-05-04 11:32:12 -04:00
refactor(sysUpdate): Include the refresh flag in Fedora upgrade cmd
This commit is contained in:
@@ -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 {
|
||||
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)
|
||||
if len(names) == 0 {
|
||||
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})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user