mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Make sure we set the effective environment when lock_saltenv is True
This commit is contained in:
parent
0b85d1273f
commit
d0cf06a24d
1 changed files with 3 additions and 5 deletions
|
@ -1853,6 +1853,9 @@ class State(object):
|
|||
'__lowstate__': immutabletypes.freeze(chunks) if chunks else {}
|
||||
}
|
||||
|
||||
if '__env__' in low:
|
||||
inject_globals['__env__'] = six.text_type(low['__env__'])
|
||||
|
||||
if self.inject_globals:
|
||||
inject_globals.update(self.inject_globals)
|
||||
|
||||
|
@ -1886,11 +1889,6 @@ class State(object):
|
|||
# allow setting the OS environ also make use of the "env"
|
||||
# keyword argument, which is not a string
|
||||
inject_globals['__env__'] = six.text_type(cdata['kwargs']['env'])
|
||||
elif '__env__' in low:
|
||||
# The user is passing an alternative environment using
|
||||
# __env__ which is also not the appropriate choice, still,
|
||||
# handle it
|
||||
inject_globals['__env__'] = six.text_type(low['__env__'])
|
||||
|
||||
if '__env__' not in inject_globals:
|
||||
# Let's use the default environment
|
||||
|
|
Loading…
Add table
Reference in a new issue