Do not start login shell and load ~/.profile if starting a failsafe session

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

Fixes #2150.
This commit is contained in:
agnostic-apollo 2021-06-30 03:48:09 +05:00
parent 28b9f93d13
commit 94c5f3674a
1 changed files with 4 additions and 1 deletions

View File

@ -91,9 +91,12 @@ public class TermuxSession {
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);