1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

[PR #7506/c2e578cb backport][stable-8] pipx: change parameter formatter for pip_args (#7514)

pipx: change parameter formatter for pip_args (#7506)

* change parameter formatter for pip_args

* add changelog frag

(cherry picked from commit c2e578cb14)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2023-11-11 12:36:48 +01:00 committed by GitHub
parent 4b84127ef3
commit a8351fa9df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- pipx module utils - change the CLI argument formatter for the `pip_args` parameter (https://github.com/ansible-collections/community.general/issues/7497, https://github.com/ansible-collections/community.general/pull/7506).

View file

@ -42,7 +42,7 @@ def pipx_runner(module, command, **kwargs):
system_site_packages=fmt.as_bool("--system-site-packages"), system_site_packages=fmt.as_bool("--system-site-packages"),
_list=fmt.as_fixed(['list', '--include-injected', '--json']), _list=fmt.as_fixed(['list', '--include-injected', '--json']),
editable=fmt.as_bool("--editable"), editable=fmt.as_bool("--editable"),
pip_args=fmt.as_opt_val('--pip-args'), pip_args=fmt.as_opt_eq_val('--pip-args'),
), ),
environ_update={'USE_EMOJI': '0'}, environ_update={'USE_EMOJI': '0'},
check_rc=True, check_rc=True,

View file

@ -314,3 +314,28 @@
that: that:
- install_tox_sitewide is changed - install_tox_sitewide is changed
- usrlocaltox.stat.exists - usrlocaltox.stat.exists
##############################################################################
# Test for issue 7497
- name: ensure application pyinstaller is uninstalled
community.general.pipx:
name: pyinstaller
state: absent
- name: Install Python Package pyinstaller
community.general.pipx:
name: pyinstaller
state: present
system_site_packages: true
pip_args: "--no-cache-dir"
register: install_pyinstaller
- name: cleanup pyinstaller
community.general.pipx:
name: pyinstaller
state: absent
- name: check assertions
assert:
that:
- install_pyinstaller is changed