Skip to content

Commit

Permalink
Do not start login shell and load ~/.profile if starting a failsafe s…
Browse files Browse the repository at this point in the history
…ession

This is done by not starting arg `0` with `-`

Fixes #2150.
  • Loading branch information
agnostic-apollo committed Jun 30, 2021
1 parent 28b9f93 commit 94c5f36
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,12 @@ public static TermuxSession execute(@NonNull final Context context, @NonNull Exe

if (executionCommand.executable == null) {
// Fall back to system shell as last resort:
// Do not start a login shell since $HOME/.profile, etc may cause startup failure if they are not valid
executionCommand.executable = "/system/bin/sh";
} else {
isLoginShell = true;
}
isLoginShell = true;

}

String[] processArgs = shellEnvironmentClient.setupProcessArgs(executionCommand.executable, executionCommand.arguments);
Expand Down

0 comments on commit 94c5f36

Please sign in to comment.