Skip to content

Commit

Permalink
add error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeoeding committed Nov 26, 2024
1 parent b6017ea commit 1a75400
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion run.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,16 @@ if (fs.existsSync(packageJsonPath)) {

if (packageJson.scripts && packageJson.scripts.postinstall) {
const pkgManager = shouldUseYarn() ? 'yarn' : 'npm';
exec(`${pkgManager} run postinstall`, {cwd: appPath})
exec(`${pkgManager} run postinstall`, {cwd: appPath}, (error, _stdout, stderr) => {
if (error) {
console.error(`Error: ${error.message}`);
return;
}
if (stderr) {
console.error(`stderr: ${stderr}`);
return;
}
});
}
}

Expand Down

0 comments on commit 1a75400

Please sign in to comment.