diff --git a/package.js b/package.js index 5fc0f5cd3a2..b2112f7e5ab 100644 --- a/package.js +++ b/package.js @@ -71,6 +71,7 @@ const exec = async (command, encoding) => { if (encoding) { return child_process.execSync(command, { cwd: __dirname, encoding: encoding }); } + console.log(command); child_process.execSync(command, { cwd: __dirname, stdio: [ 0,1,2 ] }); return ''; /* @@ -186,8 +187,11 @@ const pullrequest = async (organization, repository, body) => { }; const install = async () => { + console.log(' -- '); const node_modules = path.join(__dirname, 'node_modules'); + console.log(' -- ' + node_modules); if (!await exists(node_modules)) { + console.log(' --- '); await exec('npm install'); } }; @@ -204,7 +208,8 @@ const clean = async () => { }; const purge = async () => { - clean(); + await clean(); + await rm('third_party', 'bin'); await rm('third_party', 'env'); await rm('third_party', 'source'); }; @@ -508,8 +513,11 @@ const pull = async () => { if (before.trim() !== after.trim()) { const output = exec('git diff --name-only ' + before.trim() + ' ' + after.trim()); const files = new Set(output.split('\n')); + console.log(files); if (files.has('package.json')) { - clean(); + console.log(' - clean'); + await clean(); + console.log(' - install'); await install(); } }