Skip to content

Commit 8f156dc

Browse files
Fixed: Do not assume failure if stderr is set for bootstrap second stage as a postinst script could be using stderr for logging
Exit code `0` should be enough to check for failure.
1 parent 2522c62 commit 8f156dc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

app/src/main/java/com/termux/app/TermuxInstaller.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,7 @@ public void run() {
228228
executionCommand.commandLabel = "Termux Bootstrap Second Stage Command";
229229
executionCommand.backgroundCustomLogLevel = Logger.LOG_LEVEL_NORMAL;
230230
TermuxTask termuxTask = TermuxTask.execute(activity, executionCommand, null, new TermuxShellEnvironmentClient(), true);
231-
boolean stderrSet = !executionCommand.resultData.stderr.toString().isEmpty();
232-
if (termuxTask == null || !executionCommand.isSuccessful() || executionCommand.resultData.exitCode != 0 || stderrSet) {
231+
if (termuxTask == null || !executionCommand.isSuccessful() || executionCommand.resultData.exitCode != 0) {
233232
// Generate debug report before deleting broken prefix directory to get `stat` info at time of failure.
234233
showBootstrapErrorDialog(activity, whenDone, MarkdownUtils.getMarkdownCodeForString(executionCommand.toString(), true));
235234

0 commit comments

Comments
 (0)