From cee275f61bf0d1c752cd47097ff1dfb973d35745 Mon Sep 17 00:00:00 2001 From: Labhansh Agrawal Date: Mon, 7 Feb 2022 12:27:20 +0530 Subject: [PATCH] Use shell-env only for AppImages --- app/session.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/session.ts b/app/session.ts index 237343a8..152560a8 100644 --- a/app/session.ts +++ b/app/session.ts @@ -108,7 +108,8 @@ export default class Session extends EventEmitter { init({uid, rows, cols: columns, cwd, shell: _shell, shellArgs: _shellArgs}: SessionOptions) { // eslint-disable-next-line @typescript-eslint/no-var-requires const osLocale = require('os-locale') as typeof import('os-locale'); - const cleanEnv = shellEnv.sync(_shell || defaultShell); + const cleanEnv = + process.env['APPIMAGE'] && process.env['APPDIR'] ? shellEnv.sync(_shell || defaultShell) : process.env; const baseEnv = Object.assign( {}, cleanEnv,