Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

powershell - fix for ANSIBLE_KEEP_REMOTE_FILES on older Pythons #45942

Merged
merged 1 commit into from
Sep 21, 2018

Conversation

jborean93
Copy link
Contributor

SUMMARY

As stated by https://docs.python.org/2/library/shlex.html

Prior to Python 2.7.3, this module did not support Unicode input.

This change makes sure the command passed into the PowerShell command builder is a native (byte string) on Python 2.x and a unicode string on Python 3.x. This fits the support statement for shlex and ensures the output command is valid.

Fixes #45490

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

powershell

ANSIBLE VERSION
devel

@ansibot
Copy link
Contributor

ansibot commented Sep 20, 2018

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team. windows Windows community labels Sep 20, 2018
@jborean93
Copy link
Contributor Author

Test failure is unrelated to the changes made.

@jborean93 jborean93 merged commit ce515a6 into ansible:devel Sep 21, 2018
@jborean93 jborean93 deleted the win-keep-remote branch September 21, 2018 00:04
jborean93 added a commit to jborean93/ansible that referenced this pull request Sep 21, 2018
jborean93 added a commit to jborean93/ansible that referenced this pull request Sep 21, 2018
@jborean93
Copy link
Contributor Author

Backport PRs
stable-2.6 #45945
stable-2.7 #45946

mattclay pushed a commit that referenced this pull request Sep 25, 2018
jborean93 added a commit to jborean93/ansible that referenced this pull request Sep 27, 2018
jborean93 added a commit to jborean93/ansible that referenced this pull request Sep 27, 2018
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team. windows Windows community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting ANSIBLE_KEEP_REMOTE_FILES=1 causes failures during setup from windows servers
3 participants