Skip to content

Commit a2daf11

Browse files
Merge pull request #27 from didoo/fix_spawn_stdio
Show the spawned process output when executing a pkgScript
2 parents d1a6ab9 + 9c50dbf commit a2daf11

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function runNpmScriptIfExists (manifest, script) {
120120
let pkgScripts = pkg.scripts;
121121

122122
if (pkgScripts && pkgScripts[script]) {
123-
exec('npm', ['run', script]);
123+
exec('npm', ['run', script], { stdio: 'inherit' });
124124
}
125125
}
126126

@@ -227,8 +227,8 @@ function git (manifests, options) {
227227
* @param {string} command - The command to run
228228
* @param {string[]} args - An array of arguments to pass
229229
*/
230-
function exec (command, args) {
231-
let result = spawnSync(command, args);
230+
function exec (command, args, opts) {
231+
let result = spawnSync(command, args, opts);
232232

233233
if (result.status || result.error) {
234234
console.error(

0 commit comments

Comments
 (0)