LinkUtil - ignore LIB env var (#76184)

pull/76208/head
Jordan Borean 3 years ago committed by GitHub
parent 2fd26ea35a
commit db2aee558b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- Ansible.ModuleUtils.LinkUtil - Ignore the ``LIB`` environment variable when loading the ``LinkUtil`` code

@ -394,6 +394,7 @@ namespace Ansible
# FUTURE: find a better way to get the _ansible_remote_tmp variable
$original_tmp = $env:TMP
$original_lib = $env:LIB
$remote_tmp = $original_tmp
$module_params = Get-Variable -Name complex_args -ErrorAction SilentlyContinue
@ -405,8 +406,10 @@ namespace Ansible
}
$env:TMP = $remote_tmp
$env:LIB = $null
Add-Type -TypeDefinition $link_util
$env:TMP = $original_tmp
$env:LIB = $original_lib
# enable the SeBackupPrivilege if it is disabled
$state = Get-AnsiblePrivilege -Name SeBackupPrivilege

Loading…
Cancel
Save