Added: Add support in AppShell and TermuxSession for caller to add/override additional environment variables not added by IShellEnvironment.setupShellCommandEnvironment()

This commit is contained in:
agnostic-apollo
2022-06-11 19:23:53 +05:00
parent 13d93ccac7
commit 2998558e9f
5 changed files with 17 additions and 5 deletions

View File

@@ -467,7 +467,7 @@ public final class TermuxService extends Service implements AppShell.AppShellCli
Logger.logVerboseExtended(LOG_TAG, executionCommand.toString());
AppShell newTermuxTask = AppShell.execute(this, executionCommand, this,
new TermuxShellEnvironment(),false);
new TermuxShellEnvironment(), null,false);
if (newTermuxTask == null) {
Logger.logError(LOG_TAG, "Failed to execute new TermuxTask command for:\n" + executionCommand.getCommandIdAndLabelLogString());
// If the execution command was started for a plugin, then process the error
@@ -579,7 +579,7 @@ public final class TermuxService extends Service implements AppShell.AppShellCli
// then no need to set stdout
executionCommand.terminalTranscriptRows = mProperties.getTerminalTranscriptRows();
TermuxSession newTermuxSession = TermuxSession.execute(this, executionCommand, getTermuxTerminalSessionClient(),
this, new TermuxShellEnvironment(), executionCommand.isPluginExecutionCommand);
this, new TermuxShellEnvironment(), null, executionCommand.isPluginExecutionCommand);
if (newTermuxSession == null) {
Logger.logError(LOG_TAG, "Failed to execute new TermuxSession command for:\n" + executionCommand.getCommandIdAndLabelLogString());
// If the execution command was started for a plugin, then process the error