diff options
-rw-r--r-- | sos/plugins/__init__.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py index 137e1a1a..10fdae53 100644 --- a/sos/plugins/__init__.py +++ b/sos/plugins/__init__.py @@ -499,8 +499,12 @@ class Plugin(object): self._log_info("added copyspec '%s'" % copy_paths) def get_command_output(self, prog, timeout=300, runat=None, stderr=True): - result = sos_get_command_output(prog, timeout=timeout, chdir=runat, - stderr=stderr) + if self.commons['cmdlineopts'].chroot == 'always': + root = self.sysroot + else: + root = None + result = sos_get_command_output(prog, timeout=timeout, stderr=stderr + chroot=root, chdir=runat) if result['status'] == 124: self._log_warn("command '%s' timed out after %ds" % (prog, timeout)) |