mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
use exec.silent so npm errors are not swallowed
This commit is contained in:
parent
f06d0b276f
commit
3b18afee8f
1 changed files with 3 additions and 3 deletions
|
@ -2,7 +2,7 @@ module.exports = function (grunt) {
|
|||
let { config } = grunt;
|
||||
let { statSync } = require('fs');
|
||||
let { join } = require('path');
|
||||
let exec = (...args) => require('../utils/exec')(...args, { cwd: config.get('root') });
|
||||
let exec = (...args) => require('../utils/exec').silent(...args, { cwd: config.get('root') });
|
||||
let newFiles = [];
|
||||
let shrinkwrapFile = join(config.get('root'), 'npm-shrinkwrap.json');
|
||||
|
||||
|
@ -13,7 +13,7 @@ module.exports = function (grunt) {
|
|||
if (e.code !== 'ENOENT') throw e;
|
||||
|
||||
if (createIfMissing) {
|
||||
exec('npm', ['shrinkwrap', '--silent', '--dev']);
|
||||
exec('npm', ['shrinkwrap', '--dev']);
|
||||
newFiles.push(shrinkwrapFile);
|
||||
}
|
||||
else grunt.fail.warn('Releases require an npm-shrinkwrap.json file to exist');
|
||||
|
@ -28,7 +28,7 @@ module.exports = function (grunt) {
|
|||
exec('cp', ['npm-shrinkwrap.json', join(config.get('root'), 'build', 'kibana', 'npm-shrinkwrap.build.json')]);
|
||||
|
||||
// create shrinkwrap without dev dependencies and copy to build
|
||||
exec('npm', ['shrinkwrap', '--silent']);
|
||||
exec('npm', ['shrinkwrap']);
|
||||
exec('cp', ['npm-shrinkwrap.json', join(config.get('root'), 'build', 'kibana', 'npm-shrinkwrap.json')]);
|
||||
|
||||
// restore the dev shrinkwrap
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue