Added PATH and LANG env variable to terminal, using parent, if defined.

This commit is contained in:
Bryan Roe 2021-08-11 14:03:47 -07:00
parent 6314a62258
commit 189941bd44
2 changed files with 8 additions and 2 deletions

View File

@ -1949,7 +1949,10 @@ function onTunnelData(data) {
var login = process.platform == 'linux' ? '/bin/login' : '/usr/bin/login'; var login = process.platform == 'linux' ? '/bin/login' : '/usr/bin/login';
var env = { HISTCONTROL: 'ignoreboth' }; var env = { HISTCONTROL: 'ignoreboth' };
if (this.httprequest.xoptions) { if (process.env['LANG']) { env['LANG'] = process.env['LANG']; }
if (process.env['PATH']) { env['PATH'] = process.env['PATH']; }
if (this.httprequest.xoptions)
{
if (this.httprequest.xoptions.rows) { env.LINES = ('' + this.httprequest.xoptions.rows); } if (this.httprequest.xoptions.rows) { env.LINES = ('' + this.httprequest.xoptions.rows); }
if (this.httprequest.xoptions.cols) { env.COLUMNS = ('' + this.httprequest.xoptions.cols); } if (this.httprequest.xoptions.cols) { env.COLUMNS = ('' + this.httprequest.xoptions.cols); }
} }

View File

@ -979,7 +979,10 @@ require('MeshAgent').AddCommandHandler(function (data) {
} }
else { else {
var env = { HISTCONTROL: 'ignoreboth' }; var env = { HISTCONTROL: 'ignoreboth' };
if (this.httprequest.xoptions) { if (process.env['LANG']) { env['LANG'] = process.env['LANG']; }
if (process.env['PATH']) { env['PATH'] = process.env['PATH']; }
if (this.httprequest.xoptions)
{
if (this.httprequest.xoptions.rows) { env.LINES = ('' + this.httprequest.xoptions.rows); } if (this.httprequest.xoptions.rows) { env.LINES = ('' + this.httprequest.xoptions.rows); }
if (this.httprequest.xoptions.cols) { env.COLUMNS = ('' + this.httprequest.xoptions.cols); } if (this.httprequest.xoptions.cols) { env.COLUMNS = ('' + this.httprequest.xoptions.cols); }
} }