From e0d73c9b8e6bee3d515f488b7b5f41aecb526ebc Mon Sep 17 00:00:00 2001 From: Shaun Tabone Date: Sun, 29 Dec 2019 14:55:04 +0100 Subject: [PATCH] Minor refactoring --- src/npm.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/npm.ts b/src/npm.ts index 6137a3ca..71649a43 100644 --- a/src/npm.ts +++ b/src/npm.ts @@ -54,8 +54,8 @@ function checkNPM(cancellationToken?: CancellationToken): Promise { function getNpmDependencies(cwd: string): Promise { return checkNPM() - .then(({ stdout }) => stdout .then(() => exec('npm list --production --parseable --depth=99999 --loglevel=error', { cwd, maxBuffer: 5000 * 1024 })) + .then(({ stdout }) => stdout .split(/[\r\n]/) .filter(dir => path.isAbsolute(dir))); }