Skip to content

Commit b093434

Browse files
committed
fix: update Post Install scripts
1 parent 3e1d41c commit b093434

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

script.js

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
1-
const childProcess = require('child_process');
1+
const { exec } = require('child_process');
22
const fs = require('fs');
33

4-
if (fs.existsSync('./no-postinstall')) {
5-
childProcess.execSync('node ./lib/postinstall.js');
4+
if (fs.existsSync('./.no-postinstall')) {
5+
console.log('Post install script was not run');
6+
process.exit(0);
67
}
8+
9+
console.info('Attempting to configure firebase storage adapter\n\n');
10+
const postInstall = exec('node ./lib/postinstall.js', function (error, stdout, stderr) {
11+
if (error) {
12+
console.error(error.stack);
13+
}
14+
});
15+
16+
postInstall.on('exit', () => {
17+
if (postInstall.exitCode === 0) {
18+
console.info('You project was configured successfully');
19+
}
20+
});

0 commit comments

Comments
 (0)