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