build(tools): npm/copy-npm-shrinkwrap should gracefully handle situation when shrinkwrap file is missing
This situation occurs during mas update of all dependencies, so we should not throw errors when this happens.
This commit is contained in:
parent
6cfc6f5bb2
commit
3778ac26aa
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
var fs = require('fs');
|
||||||
var fse = require('fs-extra');
|
var fse = require('fs-extra');
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
|
|
||||||
|
@ -9,4 +10,8 @@ var PROJECT_ROOT = path.join(__dirname, '../../');
|
||||||
|
|
||||||
process.chdir(PROJECT_ROOT);
|
process.chdir(PROJECT_ROOT);
|
||||||
|
|
||||||
|
if (fs.existsSync(NPM_SHRINKWRAP_FILE)) {
|
||||||
fse.copySync(NPM_SHRINKWRAP_FILE, NPM_SHRINKWRAP_CACHED_FILE);
|
fse.copySync(NPM_SHRINKWRAP_FILE, NPM_SHRINKWRAP_CACHED_FILE);
|
||||||
|
} else {
|
||||||
|
console.warn(`${NPM_SHRINKWRAP_FILE} not found. Copy operation will be skipped.`);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue