Added PATH and LANG env variable to terminal, using parent, if defined.
Bryan Roe committed
Aug 11, 2021 at 14:03 UTC
189941bd44f69f1df7aa2b65c31ea16d5d14f1a1
2 files changed
+8
-2
agents/meshcore.js
+4
-1
@@ -1949,7 +1949,10 @@ function onTunnelData(data) {
1949
var login = process.platform == 'linux' ? '/bin/login' : '/usr/bin/login';
1950
1951
var env = { HISTCONTROL: 'ignoreboth' };
1952
- if (this.httprequest.xoptions) {
1952
+ if (process.env['LANG']) { env['LANG'] = process.env['LANG']; }
1953
+ if (process.env['PATH']) { env['PATH'] = process.env['PATH']; }
1954
+ if (this.httprequest.xoptions)
1955
+ {
1956
if (this.httprequest.xoptions.rows) { env.LINES = ('' + this.httprequest.xoptions.rows); }
1957
if (this.httprequest.xoptions.cols) { env.COLUMNS = ('' + this.httprequest.xoptions.cols); }
1958
}
agents/recoverycore.js
+4
-1
@@ -979,7 +979,10 @@ require('MeshAgent').AddCommandHandler(function (data) {
979
}
980
else {
981
var env = { HISTCONTROL: 'ignoreboth' };
982
- if (this.httprequest.xoptions) {
982
+ if (process.env['LANG']) { env['LANG'] = process.env['LANG']; }
983
+ if (process.env['PATH']) { env['PATH'] = process.env['PATH']; }
984
+ if (this.httprequest.xoptions)
985
+ {
986
if (this.httprequest.xoptions.rows) { env.LINES = ('' + this.httprequest.xoptions.rows); }
987
if (this.httprequest.xoptions.cols) { env.COLUMNS = ('' + this.httprequest.xoptions.cols); }
988
}