From ac48703a2e7de467fbcc2edefc1f0c2a63a5cf8b Mon Sep 17 00:00:00 2001 From: Shaun Smith Date: Wed, 28 Jun 2017 18:06:27 +0100 Subject: [PATCH] fix: accept package manager from test result if returned When testing a GitHub url without an explicit target file the CLI won't know which package manager was used to perform the test, so accept the package manager from the test response if returned. --- lib/snyk-test/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/snyk-test/index.js b/lib/snyk-test/index.js index a7600c2587..73d61de559 100644 --- a/lib/snyk-test/index.js +++ b/lib/snyk-test/index.js @@ -29,7 +29,9 @@ function executeTest(root, options) { options.packageManager = packageManager; return run(root, options) .then(function (res) { - res.packageManager = packageManager; + if (!res.packageManager) { + res.packageManager = packageManager; + } return res; }); } catch (error) {