mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-07 03:05:18 +08:00
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:
@@ -91,9 +91,12 @@ public class TermuxSession {
|
|||||||
|
|
||||||
if (executionCommand.executable == null) {
|
if (executionCommand.executable == null) {
|
||||||
// Fall back to system shell as last resort:
|
// 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";
|
executionCommand.executable = "/system/bin/sh";
|
||||||
|
} else {
|
||||||
|
isLoginShell = true;
|
||||||
}
|
}
|
||||||
isLoginShell = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] processArgs = shellEnvironmentClient.setupProcessArgs(executionCommand.executable, executionCommand.arguments);
|
String[] processArgs = shellEnvironmentClient.setupProcessArgs(executionCommand.executable, executionCommand.arguments);
|
||||||
|
Reference in New Issue
Block a user