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

Master #62626

Merged
merged 3 commits into from
Sep 20, 2019
Merged

Master #62626

merged 3 commits into from
Sep 20, 2019

Conversation

richardsonky
Copy link
Contributor

Update Test-Path to use -LiteralPath instead of -Path to fix issue where powershell will not detect path with special characters such as '=' and '[]'.

SUMMARY
Fix for #62521

ISSUE TYPE
Bugfix Pull Request
COMPONENT NAME
win_package

ADDITIONAL INFORMATION
If the path variable is contains characters such as '=' or '[]' powershell can't verify the path using Test-Path. The powershell command needs to be Test-Path -LiteralPath for it verify it correctly.

richardsonky and others added 3 commits September 18, 2019 10:09
Update Test-Path to use -LiteralPath instead of -Path to fix issue where powershell will not detect path with special characters such as '=' and '[]'.
modified other instances of -Path and changed to -LiteralPath.  All except line L243 since it is a different function.
@ansibot
Copy link
Contributor

ansibot commented Sep 19, 2019

@ansibot ansibot added affects_2.10 This issue/PR affects Ansible v2.10 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. new_contributor This PR is the first contribution by a new community member. support:core This issue/PR relates to code supported by the Ansible Engineering Team. windows Windows community labels Sep 19, 2019
@jborean93
Copy link
Contributor

Thanks for working on this one.

@jborean93 jborean93 merged commit 153a322 into ansible:devel Sep 20, 2019
@jborean93
Copy link
Contributor

If you would like to see this in Ansible 2.9, you can follow https://docs.ansible.com/ansible/latest/community/development_process.html#backporting-merged-prs to create a backport PR. Please make sure you create a changelog fragment as well if you wish to backport this.

@sivel sivel removed the needs_triage Needs a first human triage before being processed. label Sep 20, 2019
anas-shami pushed a commit to anas-shami/ansible that referenced this pull request Sep 23, 2019
* Update win_package.ps1

Update Test-Path to use -LiteralPath instead of -Path to fix issue where powershell will not detect path with special characters such as '=' and '[]'.

* Update win_package.ps1

modified other instances of -Path and changed to -LiteralPath.  All except line L243 since it is a different function.

* added literal path to get-itemproperty
richardsonky added a commit to richardsonky/ansible that referenced this pull request Sep 23, 2019
* Update win_package.ps1

Update Test-Path to use -LiteralPath instead of -Path to fix issue where powershell will not detect path with special characters such as '=' and '[]'.

* Update win_package.ps1

modified other instances of -Path and changed to -LiteralPath.  All except line L243 since it is a different function.

* added literal path to get-itemproperty

(cherry picked from commit 153a322)
@ansible ansible locked and limited conversation to collaborators Oct 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.10 This issue/PR affects Ansible v2.10 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. new_contributor This PR is the first contribution by a new community member. 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.

None yet

4 participants