if(require.main!==module)throw new Error("This file should not be required");var childProcess=require("child_process"),fs=require("fs"),paramFilePath=process.argv[2],serializedParams=fs.readFileSync(paramFilePath,"utf8"),params=JSON.parse(serializedParams),cmd=params.command,execOptions=params.execOptions,pipe=params.pipe,stdoutFile=params.stdoutFile,stderrFile=params.stderrFile,c=childProcess.exec(cmd,execOptions,(function(e){e?void 0===e.code?process.exitCode=1:process.exitCode=e.code:process.exitCode=0})),stdoutStream=fs.createWriteStream(stdoutFile),stderrStream=fs.createWriteStream(stderrFile);c.stdout.pipe(stdoutStream),c.stderr.pipe(stderrStream),c.stdout.pipe(process.stdout),c.stderr.pipe(process.stderr),pipe&&c.stdin.end(pipe);