Skip to content

Commit 7f632cf

Browse files
Fixed: Generate debug report before deleting broken prefix directory after bootstrap second stage failure to get stat info at time of failure
1 parent 999f10d commit 7f632cf

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

+4-3
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,13 @@ public void run() {
224224
TermuxTask termuxTask = TermuxTask.execute(activity, executionCommand, null, new TermuxShellEnvironmentClient(), true);
225225
boolean stderrSet = !executionCommand.resultData.stderr.toString().isEmpty();
226226
if (termuxTask == null || !executionCommand.isSuccessful() || executionCommand.resultData.exitCode != 0 || stderrSet) {
227-
// Delete prefix directory as otherwise when app is restarted, the broken prefix directory would be used and logged into
227+
// Generate debug report before deleting broken prefix directory to get `stat` info at time of failure.
228+
showBootstrapErrorDialog(activity, whenDone, MarkdownUtils.getMarkdownCodeForString(executionCommand.toString(), true));
229+
230+
// Delete prefix directory as otherwise when app is restarted, the broken prefix directory would be used and logged into.
228231
error = FileUtils.deleteFile("termux prefix directory", TERMUX_PREFIX_DIR_PATH, true);
229232
if (error != null)
230233
Logger.logErrorExtended(LOG_TAG, error.toString());
231-
232-
showBootstrapErrorDialog(activity, whenDone, MarkdownUtils.getMarkdownCodeForString(executionCommand.toString(), true));
233234
return;
234235
}
235236
}

0 commit comments

Comments
 (0)