mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 05:40:23 -07:00
force Windows to always use preamble-free UTF8 input encoding (#22934)
* fixes #15770 * When running under the UTF-8 codepage, Powershell subprocesses will fail (eg, Start-Job, others) if the input encoding is using the default BOM preamble. This fix forces it to use no preamble in leaf_exec and win_shell, and includes tests to verify that Start-Job works.
This commit is contained in:
parent
cd662efd2b
commit
e084e8809e
4 changed files with 26 additions and 0 deletions
|
@ -115,3 +115,13 @@
|
|||
that:
|
||||
- "not raw_with_items_result|failed"
|
||||
- "raw_with_items_result.results|length == 32"
|
||||
|
||||
- name: test raw with job to ensure that preamble-free InputEncoding is working
|
||||
raw: Start-Job { echo yo } | Receive-Job -Wait
|
||||
register: raw_job_result
|
||||
|
||||
- name: check raw with job result
|
||||
assert:
|
||||
that:
|
||||
- raw_job_result | succeeded
|
||||
- raw_job_result.stdout_lines[0] == 'yo'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue