mirror of
https://github.com/Jguer/yay
synced 2024-10-31 13:42:27 +00:00
Install repo deps for aur packages after questions
This commit is contained in:
parent
cdaee7d1d4
commit
03295c3f3f
1 changed files with 22 additions and 21 deletions
41
install.go
41
install.go
|
@ -82,26 +82,6 @@ func install(parser *arguments) error {
|
|||
return fmt.Errorf("Aborting due to user")
|
||||
}
|
||||
|
||||
if len(dc.Repo) > 0 {
|
||||
arguments := parser.copy()
|
||||
arguments.delArg("u", "sysupgrade")
|
||||
arguments.delArg("y", "refresh")
|
||||
arguments.op = "S"
|
||||
arguments.targets = make(stringSet)
|
||||
arguments.addArg("needed", "asdeps")
|
||||
for _, pkg := range dc.Repo {
|
||||
arguments.addTarget(pkg.Name())
|
||||
}
|
||||
|
||||
oldConfirm := config.NoConfirm
|
||||
config.NoConfirm = true
|
||||
passToPacman(arguments)
|
||||
config.NoConfirm = oldConfirm
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// if !continueTask("Proceed with download?", "nN") {
|
||||
// return fmt.Errorf("Aborting due to user")
|
||||
// }
|
||||
|
@ -123,6 +103,27 @@ func install(parser *arguments) error {
|
|||
return err
|
||||
}
|
||||
|
||||
if len(dc.Repo) > 0 {
|
||||
arguments := parser.copy()
|
||||
arguments.delArg("u", "sysupgrade")
|
||||
arguments.delArg("y", "refresh")
|
||||
arguments.op = "S"
|
||||
arguments.targets = make(stringSet)
|
||||
arguments.addArg("needed", "asdeps")
|
||||
for _, pkg := range dc.Repo {
|
||||
arguments.addTarget(pkg.Name())
|
||||
}
|
||||
|
||||
oldConfirm := config.NoConfirm
|
||||
config.NoConfirm = true
|
||||
passToPacman(arguments)
|
||||
config.NoConfirm = oldConfirm
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if _, ok := arguments.options["gendb"]; ok {
|
||||
fmt.Println("GenDB finished. No packages were installed")
|
||||
return nil
|
||||
|
|
Loading…
Reference in a new issue