LinkUtil - ignore LIB env var (#76184)

This commit is contained in:
Jordan Borean
2021-11-03 04:47:28 +10:00
committed by GitHub
parent 2fd26ea35a
commit db2aee558b
2 changed files with 5 additions and 0 deletions
@@ -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