-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
170 additions
and
3 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,39 @@ | ||
module.exports=(()=>{var e={607:(e,r,t)=>{e=t.nmd(e);if(require.main!==e){throw new Error("This file should not be required")}var i=t(129);var s=t(747);var a=process.argv[2];var d=s.readFileSync(a,"utf8");var o=JSON.parse(d);var p=o.command;var _=o.execOptions;var c=o.pipe;var u=o.stdoutFile;var n=o.stderrFile;var l=i.exec(p,_,function(e){if(!e){process.exitCode=0}else if(e.code===undefined){process.exitCode=1}else{process.exitCode=e.code}});var v=s.createWriteStream(u);var f=s.createWriteStream(n);l.stdout.pipe(v);l.stderr.pipe(f);l.stdout.pipe(process.stdout);l.stderr.pipe(process.stderr);if(c){l.stdin.end(c)}},129:e=>{"use strict";e.exports=require("child_process")},747:e=>{"use strict";e.exports=require("fs")}};var r={};function __nccwpck_require__(t){if(r[t]){return r[t].exports}var i=r[t]={id:t,loaded:false,exports:{}};var s=true;try{e[t](i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete r[t]}i.loaded=true;return i.exports}(()=>{__nccwpck_require__.nmd=(e=>{e.paths=[];if(!e.children)e.children=[];return e})})();__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(607)})(); | ||
if (require.main !== module) { | ||
throw new Error('This file should not be required'); | ||
} | ||
|
||
var childProcess = require('child_process'); | ||
var fs = require('fs'); | ||
|
||
var paramFilePath = process.argv[2]; | ||
|
||
var serializedParams = fs.readFileSync(paramFilePath, 'utf8'); | ||
var params = JSON.parse(serializedParams); | ||
|
||
var cmd = params.command; | ||
var execOptions = params.execOptions; | ||
var pipe = params.pipe; | ||
var stdoutFile = params.stdoutFile; | ||
var stderrFile = params.stderrFile; | ||
|
||
var c = childProcess.exec(cmd, execOptions, function (err) { | ||
if (!err) { | ||
process.exitCode = 0; | ||
} else if (err.code === undefined) { | ||
process.exitCode = 1; | ||
} else { | ||
process.exitCode = err.code; | ||
} | ||
}); | ||
|
||
var stdoutStream = fs.createWriteStream(stdoutFile); | ||
var stderrStream = fs.createWriteStream(stderrFile); | ||
|
||
c.stdout.pipe(stdoutStream); | ||
c.stderr.pipe(stderrStream); | ||
c.stdout.pipe(process.stdout); | ||
c.stderr.pipe(process.stderr); | ||
|
||
if (pipe) { | ||
c.stdin.end(pipe); | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.