Skip to content

Commit 32e9532

Browse files
committed
run commands with standard environment
1 parent 880ce1c commit 32e9532

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

susemanager-utils/susemanager-sls/src/modules/supportdata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def get(cmd_args: str = "", **kwargs) -> Dict[str, Any]:
104104
os.makedirs(output_dir, exist_ok=True)
105105
cmd.extend(extra_args)
106106
log.debug("executing: %s", cmd)
107-
ret = __salt__["cmd.run_all"](cmd, python_shell=False)
107+
ret = __salt__["cmd.run_all"](cmd, runas="root")
108108

109109
log.debug("return: %s", ret)
110110
returncode = ret["retcode"]

susemanager-utils/susemanager-sls/src/tests/test_module_supportdata.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def test_supportdata_suse():
4747

4848
supportdata.__salt__["cmd.run_all"].assert_called_once_with(
4949
["/sbin/supportconfig", "-R", "/var/log/supportdata"],
50-
python_shell=False,
50+
runas="root",
5151
)
5252

5353

@@ -76,7 +76,7 @@ def test_supportdata_suse_extra_args():
7676
"-l",
7777
"10000",
7878
],
79-
python_shell=False,
79+
runas="root",
8080
)
8181

8282

@@ -103,7 +103,7 @@ def test_supportdata_mlm_proxy():
103103
"--output",
104104
"/var/log/supportdata",
105105
],
106-
python_shell=False,
106+
runas="root",
107107
)
108108

109109

@@ -130,7 +130,7 @@ def test_supportdata_mlm_server():
130130
"--output",
131131
"/var/log/supportdata",
132132
],
133-
python_shell=False,
133+
runas="root",
134134
)
135135

136136

@@ -156,7 +156,7 @@ def test_supportdata_redhat():
156156
"--tmp-dir",
157157
"/var/log/supportdata",
158158
],
159-
python_shell=False,
159+
runas="root",
160160
)
161161

162162

@@ -183,7 +183,7 @@ def test_supportdata_debian():
183183
"--tmp-dir",
184184
"/var/log/supportdata",
185185
],
186-
python_shell=False,
186+
runas="root",
187187
)
188188

189189

0 commit comments

Comments
 (0)