From f5bc7599e4e0f289e6e6334b29fe47d2e11f3579 Mon Sep 17 00:00:00 2001 From: Trevor Benson Date: Mon, 16 Dec 2024 12:21:28 -0800 Subject: [PATCH] [collector] Use cmd.exec_code sh for improved stderr handling Signed-off-by: Trevor Benson --- sos/collector/transports/saltstack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sos/collector/transports/saltstack.py b/sos/collector/transports/saltstack.py index 42d7ba4ff..2a9c72bb0 100644 --- a/sos/collector/transports/saltstack.py +++ b/sos/collector/transports/saltstack.py @@ -125,7 +125,7 @@ def _disconnect(self): def remote_exec(self): """The remote execution command to use for this transport.""" salt_args = "--out json --static --no-color" - return f"salt {salt_args} {self.address} cmd.shell " + return f"salt {salt_args} {self.address} cmd.exec_code sh " def _copy_file_to_remote(self, fname, dest): """Copy a file to the remote host using SaltStack Master