mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-28 16:30:56 -04:00
Fix for #3026, when terminal command is set to an empty string.
This commit is contained in:
parent
3c09f15881
commit
41f70d52dc
@ -1986,15 +1986,17 @@ function onTunnelData(data) {
|
|||||||
else if (bash) {
|
else if (bash) {
|
||||||
var p = childProcess.execFile(bash, ['bash'], options); // Start bash
|
var p = childProcess.execFile(bash, ['bash'], options); // Start bash
|
||||||
// Spaces at the beginning of lines are needed to hide commands from the command history
|
// Spaces at the beginning of lines are needed to hide commands from the command history
|
||||||
if ((obj.serverInfo.termlaunchcommand != null) && (typeof obj.serverInfo.termlaunchcommand[process.platform] == 'string')) { p.stdin.write(obj.serverInfo.termlaunchcommand[process.platform]); }
|
if ((obj.serverInfo.termlaunchcommand != null) && (typeof obj.serverInfo.termlaunchcommand[process.platform] == 'string')) {
|
||||||
else if (process.platform == 'linux') { p.stdin.write(' alias ls=\'ls --color=auto\';clear\n'); }
|
if (obj.serverInfo.termlaunchcommand[process.platform] != "") { p.stdin.write(obj.serverInfo.termlaunchcommand[process.platform]); }
|
||||||
|
} else if (process.platform == 'linux') { p.stdin.write(' alias ls=\'ls --color=auto\';clear\n'); }
|
||||||
this.httprequest.connectionPromise._res(p);
|
this.httprequest.connectionPromise._res(p);
|
||||||
}
|
}
|
||||||
else if (sh) {
|
else if (sh) {
|
||||||
var p = childProcess.execFile(sh, ['sh'], options); // Start sh
|
var p = childProcess.execFile(sh, ['sh'], options); // Start sh
|
||||||
// Spaces at the beginning of lines are needed to hide commands from the command history
|
// Spaces at the beginning of lines are needed to hide commands from the command history
|
||||||
if ((obj.serverInfo.termlaunchcommand != null) && (typeof obj.serverInfo.termlaunchcommand[process.platform] == 'string')) { p.stdin.write(obj.serverInfo.termlaunchcommand[process.platform]); }
|
if ((obj.serverInfo.termlaunchcommand != null) && (typeof obj.serverInfo.termlaunchcommand[process.platform] == 'string')) {
|
||||||
else if (process.platform == 'linux') { p.stdin.write(' alias ls=\'ls --color=auto\';clear\n'); }
|
if (obj.serverInfo.termlaunchcommand[process.platform] != "") { p.stdin.write(obj.serverInfo.termlaunchcommand[process.platform]); }
|
||||||
|
} else if (process.platform == 'linux') { p.stdin.write(' alias ls=\'ls --color=auto\';clear\n'); }
|
||||||
this.httprequest.connectionPromise._res(p);
|
this.httprequest.connectionPromise._res(p);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user