fix(cmd): pass install flags into pacman in yogurt mode (#1864)

Fixes #1560
This commit is contained in:
Joey H 2022-12-27 12:55:42 -06:00 committed by GitHub
parent 2bda76e431
commit 8c61bc9b45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

11
cmd.go
View file

@ -418,19 +418,20 @@ func displayNumberMenu(ctx context.Context, pkgS []string, dbExecutor db.Executo
return err
}
arguments := cmdArgs.CopyGlobal()
arguments.AddTarget(targets...)
// modify the arguments to pass for the install
cmdArgs.Op = "S"
cmdArgs.Targets = targets
if len(arguments.Targets) == 0 {
if len(cmdArgs.Targets) == 0 {
fmt.Println(gotext.Get(" there is nothing to do"))
return nil
}
if config.NewInstallEngine {
return syncInstall(ctx, config, arguments, dbExecutor)
return syncInstall(ctx, config, cmdArgs, dbExecutor)
}
return install(ctx, arguments, dbExecutor, true)
return install(ctx, cmdArgs, dbExecutor, true)
}
func syncList(ctx context.Context, httpClient *http.Client, cmdArgs *parser.Arguments, dbExecutor db.Executor) error {