import { ISpawnOptions , Process } from '../src/spawn-process' ; import { ConsoleInterceptor } from './console-interceptor' ; import { promisify } from 'util' ; async function run ( command ) { const args = [ ] ; const options = { shell : true , testmode : true } ; const spawn = Process . spawn ( command , args , options ) ; const exitCode = await spawn . wait ( ) ; console . log ( 'exitCode:' , exitCode ) ; } async function main ( ) { try { for ( let index = 0 ; index < 2 ; index ++ ) { await run ( './out-test.sh ' + index ) ; } } catch ( error ) { console . log ( 'error:' , error ) ; } } main ( ) ;