This commit is contained in:
Ylian Saint-Hilaire 2021-08-10 16:02:43 -07:00
commit 9d03981bfc
2 changed files with 29 additions and 0 deletions

View File

@ -94,6 +94,21 @@ if (process.platform == 'win32' && require('user-sessions').isRoot()) {
} catch (e) { } } catch (e) { }
} }
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));
};
}
if (process.platform == 'darwin' && !process.versions) { if (process.platform == 'darwin' && !process.versions) {
// This is an older MacOS Agent, so we'll need to check the service definition so that Auto-Update will function correctly // This is an older MacOS Agent, so we'll need to check the service definition so that Auto-Update will function correctly
var child = require('child_process').execFile('/bin/sh', ['sh']); var child = require('child_process').execFile('/bin/sh', ['sh']);

View File

@ -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() function _getPotentialServiceNames()
{ {
var registry = require('win-registry'); var registry = require('win-registry');