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

fix Ansible.ModuleUtils.FileUtil to respect ErrorAction if running in a try/catch #45451

Merged
merged 1 commit into from
Sep 10, 2018

Conversation

jborean93
Copy link
Contributor

SUMMARY

Get-AnsibleItem tries to be a replacement for Get-Item and by itself it will respect the -ErrorAction SilentlyContinue preference. When running in a try/catch or trap then the action is ignored and the catch will fire. This makes sure we don't throw the error if running under SilentlyContinue.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

Ansible.ModuleUtils.FileUtil.psm1

ANSIBLE VERSION
devel

@ansibot
Copy link
Contributor

ansibot commented Sep 10, 2018

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests. windows Windows community labels Sep 10, 2018
@jborean93 jborean93 merged commit d4ce1b9 into ansible:devel Sep 10, 2018
@jborean93 jborean93 deleted the win-file-util-trap branch September 10, 2018 23:48
jborean93 added a commit to jborean93/ansible that referenced this pull request Sep 10, 2018
jborean93 added a commit to jborean93/ansible that referenced this pull request Sep 10, 2018
@jborean93
Copy link
Contributor Author

Backport PRs
stable-2.6 #45459
stable-2.7 #45460

abadger pushed a commit that referenced this pull request Sep 11, 2018
@webknjaz webknjaz removed needs_triage Needs a first human triage before being processed. labels Sep 11, 2018
mattclay pushed a commit that referenced this pull request Sep 25, 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. support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests. windows Windows community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants