forked from PippCandy/autoinstallers
first commit
This commit is contained in:
18
install/secu/make/node_modules/cmd-promise/test/process.js
generated
vendored
Normal file
18
install/secu/make/node_modules/cmd-promise/test/process.js
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
|
||||
const cmd = require('../cmd-promise')
|
||||
|
||||
console.log('cmd-promise: Return child process instead of output.')
|
||||
|
||||
const options = { returnProcess: true }
|
||||
|
||||
cmd(`node -v`, options).then(childProcess => {
|
||||
console.log('pid =', childProcess.pid)
|
||||
childProcess.stdout.on('data', stdout => {
|
||||
console.log('stdout =', stdout)
|
||||
})
|
||||
childProcess.stderr.on('data', stderr => {
|
||||
console.log('stderr =', stderr)
|
||||
})
|
||||
}).catch(err => {
|
||||
console.log('err =', err)
|
||||
})
|
Reference in New Issue
Block a user