fix(osfamilymap): use `whoami` for Windows `rootuser`

Fix #495
This commit is contained in:
Imran Iqbal 2020-12-29 13:15:34 +00:00
parent ef1bc02a86
commit 69d598138e
No known key found for this signature in database
GPG Key ID: 6D8629439D2B7819
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@
{%- set rootuser = salt['cmd.run']("stat -f '%Su' /dev/console") %}
{%- set rootgroup = salt['cmd.run']("stat -f '%Sg' /dev/console") %}
{%- elif grains.os_family == 'Windows' %}
{%- set rootuser = salt['cmd.run']("id -un") %}
{%- set rootuser = salt['cmd.run']("whoami").split("\\")[1] %}
{%- endif %}