smartspawn/ts/smartipc.wrap.ts

19 lines
376 B
TypeScript
Raw Normal View History

2017-03-03 19:52:23 +00:00
import * as spawnWrap from 'spawn-wrap'
let unwrap: any = null
export let startSpawnWrap = (filePath: string, cliArgs: string[], envArgs: any) => {
let spawnArray = [filePath]
for (let cliArg of cliArgs) {
spawnArray.push(cliArg)
}
unwrap = spawnWrap(spawnArray, envArgs)
}
export let endSpawnWrap = () => {
if (unwrap) {
unwrap()
unwrap = null
}
}