mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
make npm silent
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
688ff75f77
commit
13ddece1cc
@ -46,6 +46,7 @@ export class ExtensionManager {
|
||||
}
|
||||
|
||||
protected installPackageFromPath(path: string): Promise<void> {
|
||||
const origLogger = console.log
|
||||
return new Promise((resolve, reject) => {
|
||||
npm.load({
|
||||
production: true,
|
||||
@ -54,11 +55,15 @@ export class ExtensionManager {
|
||||
dev: false,
|
||||
spin: false,
|
||||
"ignore-scripts": true,
|
||||
loglevel: "error"
|
||||
loglevel: "silent"
|
||||
}, (err) => {
|
||||
console.log = function() {
|
||||
// just to ignore ts empty function error
|
||||
}
|
||||
npm.commands.install([
|
||||
path
|
||||
], (err) => {
|
||||
console.log = origLogger
|
||||
if (err) {
|
||||
reject(err)
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user