mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-07 03:05:18 +08:00
Changed: Ensure AppShell
executable is not null
before trying to execute it
This commit is contained in:
@@ -69,6 +69,13 @@ public final class AppShell {
|
||||
final AppShellClient appShellClient,
|
||||
@NonNull final ShellEnvironmentClient shellEnvironmentClient,
|
||||
final boolean isSynchronous) {
|
||||
if (executionCommand.executable == null || executionCommand.executable.isEmpty()) {
|
||||
executionCommand.setStateFailed(Errno.ERRNO_FAILED.getCode(),
|
||||
currentPackageContext.getString(R.string.error_executable_unset, executionCommand.getCommandIdAndLabelLogString()));
|
||||
AppShell.processAppShellResult(null, executionCommand);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (executionCommand.workingDirectory == null || executionCommand.workingDirectory.isEmpty())
|
||||
executionCommand.workingDirectory = shellEnvironmentClient.getDefaultWorkingDirectoryPath();
|
||||
if (executionCommand.workingDirectory.isEmpty())
|
||||
|
Reference in New Issue
Block a user