mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Fixed bug where child process does not set TERM env variable if env block is passed to child.
This commit is contained in:
parent
a5ec5f60c9
commit
d70665e7d6
2 changed files with 29 additions and 0 deletions
|
@ -28,6 +28,20 @@ catch(x)
|
|||
|
||||
}
|
||||
|
||||
if (process.platform != 'win32')
|
||||
{
|
||||
var ch = require('child_process');
|
||||
ch._execFile = ch.execFile;
|
||||
ch.execFile = function execFile(path, args, options)
|
||||
{
|
||||
if (options && options.type && options.type == ch.SpawnTypes.TERM && options.env)
|
||||
{
|
||||
options.env['TERM'] = 'xterm-256color';
|
||||
}
|
||||
return (this._execFile(path, args, options));
|
||||
};
|
||||
}
|
||||
|
||||
function _getPotentialServiceNames()
|
||||
{
|
||||
var registry = require('win-registry');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue