mirror of
https://github.com/Jguer/yay
synced 2024-08-31 05:39:29 +00:00
style(parser): simplify ignore option adding
This commit is contained in:
parent
de92f24ce5
commit
991c5b4146
|
@ -174,11 +174,7 @@ func install(cmdArgs *settings.Arguments, alpmHandle *alpm.Handle, ignoreProvide
|
|||
cmdArgs.Op = "S"
|
||||
cmdArgs.DelArg("y", "refresh")
|
||||
if arguments.ExistsArg("ignore") {
|
||||
if cmdArgs.ExistsArg("ignore") {
|
||||
cmdArgs.Options["ignore"].Args = append(cmdArgs.Options["ignore"].Args, arguments.Options["ignore"].Args...)
|
||||
} else {
|
||||
cmdArgs.Options["ignore"] = arguments.Options["ignore"]
|
||||
}
|
||||
cmdArgs.CreateOrAppendOption("ignore", arguments.GetArgs("ignore")...)
|
||||
}
|
||||
return show(passToPacman(cmdArgs))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue