mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix is_windows detection when USERNAME missing
This commit is contained in:
parent
869e8cc603
commit
c956d24283
1 changed files with 1 additions and 0 deletions
|
@ -206,6 +206,7 @@ class GitFSTest(TestCase, LoaderModuleMockMixin):
|
|||
|
||||
if 'USERNAME' not in os.environ:
|
||||
try:
|
||||
import salt.utils
|
||||
if salt.utils.is_windows():
|
||||
import salt.utils.win_functions
|
||||
os.environ['USERNAME'] = salt.utils.win_functions.get_current_user()
|
||||
|
|
Loading…
Add table
Reference in a new issue