diff --git a/README.md b/README.md index a59bcad..1549dbf 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,7 @@ The following helpers are supported and automatically selected, if present, in t | name | | Name or list of names of the package(s) to install or upgrade. | | state | **present**, latest | Desired state of the package, 'present' skips operations if the package is already installed. | | upgrade | yes, **no** | Whether or not to upgrade whole system. | +| refresh | yes, **no** | Whether or not to refresh the packages cache | | use | **auto**, yay, paru, pacaur, trizen, pikaur, aurman, makepkg | The tool to use, 'auto' uses the first known helper found and makepkg as a fallback. | | extra_args | **null** | A list of additional arguments to pass directly to the tool. Cannot be used in 'auto' mode. | | aur_only | yes, **no** | Limit helper operation to the AUR. | diff --git a/plugins/modules/aur.py b/plugins/modules/aur.py index fe569fe..d35deb5 100644 --- a/plugins/modules/aur.py +++ b/plugins/modules/aur.py @@ -183,7 +183,7 @@ def build_command_prefix(use, extra_args, skip_pgp_check=False, ignore_arch=Fals if local_pkgbuild and use != 'makepkg': command.append(local_pkgbuild) if refresh: - command.append('--y') + command.append('--refresh') if extra_args: command += shlex.split(extra_args) return command @@ -247,7 +247,7 @@ def upgrade(module, use, extra_args, aur_only, refresh): assert use in use_cmd command = build_command_prefix(use, extra_args, aur_only=aur_only, refresh=refresh) - command.append('-u') + command.append('--upgrade') rc, out, err = module.run_command(command, check_rc=True)