aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Moravec <pmoravec@redhat.com>2017-03-06 16:29:26 +0100
committerBryn M. Reeves <bmr@redhat.com>2017-03-27 18:25:29 +0100
commite0c2916ae70294fae2162c51d57a5d87464157a0 (patch)
treed24f002aa8ebfedc2e4c5318513c20fa05a45c68
parent3a3aef8a1410e6f94dee8aaa43d80934033d7589 (diff)
downloadsos-e0c2916ae70294fae2162c51d57a5d87464157a0.tar.gz
[npm] get project's npm config list only if project_path is set
_get_npm_output with working_directory=project_path must be called only if project_path is configured Resolves: #951 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
-rw-r--r--sos/plugins/npm.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/sos/plugins/npm.py b/sos/plugins/npm.py
index ab51e4af..c23a2d96 100644
--- a/sos/plugins/npm.py
+++ b/sos/plugins/npm.py
@@ -90,9 +90,9 @@ class Npm(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin, SuSEPlugin):
self.get_option("project_path")))
self._get_npm_output("npm ls --json", "npm_ls_project",
working_directory=project_path)
- self._get_npm_output("npm config list -l",
- "npm_config_list_project",
- working_directory=project_path)
+ self._get_npm_output("npm config list -l",
+ "npm_config_list_project",
+ working_directory=project_path)
self._get_npm_output("npm ls -g --json", "npm_ls_global")
self._get_npm_output("npm config list -l", "npm_config_list_global")