chore: skip building on install (#9902)

This commit is contained in:
Alex Rudenko 2023-03-22 11:11:47 +01:00 committed by GitHub
parent c6a9404bb4
commit 5f72c8bac1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,15 +24,15 @@
* necessary.
*/
const {execSync} = require('child_process');
const fs = require('fs');
const path = require('path');
// Need to ensure TS is compiled before loading the installer
if (!fs.existsSync(path.join(__dirname, 'lib'))) {
console.log('It seems we are installing from the git repo.');
console.log('Building install tools from scratch...');
execSync('npm run build --workspace puppeteer');
console.warn(
'Skipping browser installation because the Puppeteer build is not available. Run `npm install` again after you have re-built Puppeteer.'
);
process.exit(0);
}
try {