[PR #5680/488e828f backport][stable-6] ansible_galaxy_install: use locale C tentatively, else en_US (#5722)

ansible_galaxy_install: use locale C tentatively, else en_US (#5680)

* ansible_galaxy_install: use locale C tentatively, else en_US

* use custom exception to signal unsupported locale

* add step to remove artefacts at the end of the test

* add step to remove artefacts at the beginning of the test

* comment out context controller

* trying with temporary dir as destination

* remove collection before test with reqs file

* ensure collections are installed in temp dir in tests + check_force

* simplified the change

* added extra condition for failing locale

* improved exception handling

* add changelog fragment

(cherry picked from commit 488e828f9b)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2022-12-22 06:00:34 +00:00 committed by GitHub
commit 6037c5d1e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 12 deletions

View file

@ -0,0 +1,3 @@
bugfixes:
- ansible_galaxy_install - try ``C.UTF-8`` and then fall back to ``en_US.UTF-8`` before failing (https://github.com/ansible-collections/community.general/pull/5680).
- ansible_galaxy_install - set default to raise exception if command's return code is different from zero (https://github.com/ansible-collections/community.general/pull/5680).