added launching, patching, and ui override
This commit is contained in:
20
src/util/executeUtil.js
Normal file
20
src/util/executeUtil.js
Normal file
@@ -0,0 +1,20 @@
|
||||
const childProcess = require("child_process");
|
||||
|
||||
const runFile = (folder, file, args, onExit) => {
|
||||
childProcess.execFile(file, args, {
|
||||
cwd: folder
|
||||
}, (_err, _stdout, _stdin) => {
|
||||
if (onExit) onExit();
|
||||
})
|
||||
}
|
||||
|
||||
const runFileDetached = (folder, file, args) => {
|
||||
const subProcess = childProcess.spawn(file + (args ? " " + args : ''), {
|
||||
cwd: folder,
|
||||
detached: true,
|
||||
stdio: 'ignore'
|
||||
});
|
||||
subProcess.unref();
|
||||
}
|
||||
|
||||
module.exports = { runFile, runFileDetached };
|
Reference in New Issue
Block a user