Changed loglevel to error when listing deps using npm list command

This commit is contained in:
Shaun Tabone 2019-12-29 14:41:11 +01:00
parent f2c29b5440
commit 2e003b0dc5

View file

@ -54,8 +54,8 @@ function checkNPM(cancellationToken?: CancellationToken): Promise<void> {
function getNpmDependencies(cwd: string): Promise<string[]> {
return checkNPM()
.then(() => exec('npm list --production --parseable --depth=99999', { cwd, maxBuffer: 5000 * 1024 }))
.then(({ stdout }) => stdout
.then(() => exec('npm list --production --parseable --depth=99999 --loglevel=error', { cwd, maxBuffer: 5000 * 1024 }))
.split(/[\r\n]/)
.filter(dir => path.isAbsolute(dir)));
}