import * as cp from "child_process" ; import { Pair } from "tstl/utility/Pair" ; export namespace Terminal { export function execute ( ... commands ) { return new Promise ( ( resolve , reject ) => { cp . exec ( commands . join ( " && " ) , ( error , stdout , stderr ) => { if ( error ) reject ( error ) ; else resolve ( new Pair ( stdout , stderr ) ) ; } ) ; } ) ; } }