mirror of
https://github.com/linuxserver/core.git
synced 2026-02-20 05:07:19 +08:00
fix runners on windows
This commit is contained in:
parent
242bba1c28
commit
bd62f168b2
32
node_modules/vfs-local/localfs.js
generated
vendored
32
node_modules/vfs-local/localfs.js
generated
vendored
@ -2030,7 +2030,6 @@ module.exports = function setup(fsOptions) {
|
||||
// Same as tmuxspawn but than spawns bash or other shell, for windows
|
||||
var sessions = {};
|
||||
function bashspawn(ignored, options, callback) {
|
||||
var watchFile = join(options.base || "", ".run_" + options.session + ".watch");
|
||||
var session;
|
||||
|
||||
function getSessionId(){
|
||||
@ -2041,7 +2040,9 @@ module.exports = function setup(fsOptions) {
|
||||
// Fetch PID of a running process and return it
|
||||
if (options.fetchpid) {
|
||||
session = sessions[options.session];
|
||||
callback(null, { pid: session && session.pty ? session.pty.pid : -1 });
|
||||
setTimeout(function() {
|
||||
callback(null, { pid: session && session.pty ? session.pty.pid : -1 });
|
||||
}, 100); // workaround for late exit message from winpty
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2095,29 +2096,21 @@ module.exports = function setup(fsOptions) {
|
||||
sessions[name] = session;
|
||||
if (!session.wait) session.wait = [];
|
||||
|
||||
if (options.idle)
|
||||
options.command = "echo '\033[2J\033[1;1H[Idle]'";
|
||||
else if (options.command)
|
||||
options.command = "echo '\033[2J\033[1;1H';" + options.command;
|
||||
if (options.idle) {
|
||||
options.command = "echo '\033[2J\033[1;1H\033[01;34m[Idle]\033[0m'";
|
||||
} else if (options.command) {
|
||||
options.command = "echo '\033[2J\033[1;1H';" + options.command
|
||||
+ ';printf "\033[01;30m\n\nProcess exited with code: $?\033[0m\n"';
|
||||
}
|
||||
|
||||
// \"`#" + name + "`\"
|
||||
if (options.command) {
|
||||
args.push("-c", "nodosfilewarning=1;" + options.command
|
||||
+ "; ([ -e '" + watchFile + "' ] && "
|
||||
+ "rm '" + watchFile + "')");
|
||||
args.push("-c", "nodosfilewarning=1;" + options.command);
|
||||
|
||||
var cmd = args[args.length - 1];
|
||||
args[args.length - 1] = '"' + cmd.replace(/"/g, '\\"') + '"';
|
||||
}
|
||||
|
||||
if (options.output) {
|
||||
var path = watchFile[0] == "~"
|
||||
? join(process.env.HOME, watchFile.substr(1))
|
||||
: watchFile;
|
||||
fs.writeFile(path, "-1", "utf8", run);
|
||||
}
|
||||
else
|
||||
run();
|
||||
run();
|
||||
|
||||
function run(err){
|
||||
if (err) return callback(err);
|
||||
@ -2200,10 +2193,9 @@ module.exports = function setup(fsOptions) {
|
||||
function execFileWin(executablePath, options, callback) {
|
||||
if (executablePath == "kill") {
|
||||
var pid = options.args && options.args[0];
|
||||
console.error(pid, sessions)
|
||||
|
||||
Object.keys(sessions).some(function(key) {
|
||||
if (sessions[key].pid == pid && sessions[key].pty) {
|
||||
console.error(sessions[key].pty.pid)
|
||||
sessions[key].pty.killtree(-1);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@
|
||||
"c9.ide.find": "#35379124ca",
|
||||
"c9.ide.find.infiles": "#c132ad243c",
|
||||
"c9.ide.find.replace": "#44772dd796",
|
||||
"c9.ide.run.debug": "#e3a9e66497",
|
||||
"c9.ide.run.debug": "#a6bc1f422f",
|
||||
"c9.automate": "#47e2c429c9",
|
||||
"c9.ide.ace.emmet": "#6dc4585e02",
|
||||
"c9.ide.ace.gotoline": "#a8ff07c8f4",
|
||||
@ -102,7 +102,7 @@
|
||||
"c9.ide.recentfiles": "#7c099abf40",
|
||||
"c9.ide.remote": "#301d2ab519",
|
||||
"c9.ide.processlist": "#2b12cd1bdd",
|
||||
"c9.ide.run": "#62436a820a",
|
||||
"c9.ide.run": "#4d73c19553",
|
||||
"c9.ide.run.build": "#0598fff697",
|
||||
"c9.ide.run.debug.xdebug": "#61dcbd0180",
|
||||
"c9.ide.save": "#4a4a60a004",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user