Skip to content

Commit afb3db4

Browse files
authored
feat: call input start/end around spawned process (#202)
1 parent 8417f1b commit afb3db4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/run-script-pkg.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const runScriptPkg = async options => {
4444
return { code: 0, signal: null }
4545
}
4646

47+
let inputEnd = () => {}
4748
if (stdio === 'inherit') {
4849
let banner
4950
if (pkg._id) {
@@ -56,8 +57,9 @@ const runScriptPkg = async options => {
5657
banner += ` ${args.join(' ')}`
5758
}
5859
banner += '\n'
59-
const { output } = require('proc-log')
60+
const { output, input } = require('proc-log')
6061
output.standard(banner)
62+
inputEnd = input.start()
6163
}
6264

6365
const [spawnShell, spawnArgs, spawnOpts] = makeSpawnArgs({
@@ -104,7 +106,7 @@ const runScriptPkg = async options => {
104106
} else {
105107
throw er
106108
}
107-
})
109+
}).finally(inputEnd)
108110
}
109111

110112
module.exports = runScriptPkg

0 commit comments

Comments
 (0)