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> {
|
protected installPackageFromPath(path: string): Promise<void> {
|
||||||
|
const origLogger = console.log
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
npm.load({
|
npm.load({
|
||||||
production: true,
|
production: true,
|
||||||
@ -54,11 +55,15 @@ export class ExtensionManager {
|
|||||||
dev: false,
|
dev: false,
|
||||||
spin: false,
|
spin: false,
|
||||||
"ignore-scripts": true,
|
"ignore-scripts": true,
|
||||||
loglevel: "error"
|
loglevel: "silent"
|
||||||
}, (err) => {
|
}, (err) => {
|
||||||
|
console.log = function() {
|
||||||
|
// just to ignore ts empty function error
|
||||||
|
}
|
||||||
npm.commands.install([
|
npm.commands.install([
|
||||||
path
|
path
|
||||||
], (err) => {
|
], (err) => {
|
||||||
|
console.log = origLogger
|
||||||
if (err) {
|
if (err) {
|
||||||
reject(err)
|
reject(err)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user