mirror of
https://github.com/ansible/ansible.git
synced 2026-08-05 16:13:06 +02:00
LinkUtil - ignore LIB env var (#76184)
This commit is contained in:
@@ -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
|
# FUTURE: find a better way to get the _ansible_remote_tmp variable
|
||||||
$original_tmp = $env:TMP
|
$original_tmp = $env:TMP
|
||||||
|
$original_lib = $env:LIB
|
||||||
|
|
||||||
$remote_tmp = $original_tmp
|
$remote_tmp = $original_tmp
|
||||||
$module_params = Get-Variable -Name complex_args -ErrorAction SilentlyContinue
|
$module_params = Get-Variable -Name complex_args -ErrorAction SilentlyContinue
|
||||||
@@ -405,8 +406,10 @@ namespace Ansible
|
|||||||
}
|
}
|
||||||
|
|
||||||
$env:TMP = $remote_tmp
|
$env:TMP = $remote_tmp
|
||||||
|
$env:LIB = $null
|
||||||
Add-Type -TypeDefinition $link_util
|
Add-Type -TypeDefinition $link_util
|
||||||
$env:TMP = $original_tmp
|
$env:TMP = $original_tmp
|
||||||
|
$env:LIB = $original_lib
|
||||||
|
|
||||||
# enable the SeBackupPrivilege if it is disabled
|
# enable the SeBackupPrivilege if it is disabled
|
||||||
$state = Get-AnsiblePrivilege -Name SeBackupPrivilege
|
$state = Get-AnsiblePrivilege -Name SeBackupPrivilege
|
||||||
|
|||||||
Reference in New Issue
Block a user