mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-12-03 15:41:07 +01:00
Fixed: Generate debug report before deleting broken prefix directory after bootstrap second stage failure to get stat info at time of failure
This commit is contained in:
parent
6eb533cb2e
commit
1e686e55f3
1 changed files with 5 additions and 3 deletions
|
|
@ -231,12 +231,14 @@ final class TermuxInstaller {
|
||||||
AppShell appShell = AppShell.execute(activity, executionCommand, null, new TermuxShellEnvironment(), null, true);
|
AppShell appShell = AppShell.execute(activity, executionCommand, null, new TermuxShellEnvironment(), null, true);
|
||||||
boolean stderrSet = !executionCommand.resultData.stderr.toString().isEmpty();
|
boolean stderrSet = !executionCommand.resultData.stderr.toString().isEmpty();
|
||||||
if (appShell == null || !executionCommand.isSuccessful() || executionCommand.resultData.exitCode != 0 || stderrSet) {
|
if (appShell == null || !executionCommand.isSuccessful() || executionCommand.resultData.exitCode != 0 || stderrSet) {
|
||||||
// Delete prefix directory as otherwise when app is restarted, the broken prefix directory would be used and logged into
|
// Generate debug report before deleting broken prefix directory to get `stat` info at time of failure.
|
||||||
|
showBootstrapErrorDialog(activity, whenDone, MarkdownUtils.getMarkdownCodeForString(executionCommand.toString(), true));
|
||||||
|
|
||||||
|
// Delete prefix directory as otherwise when app is restarted, the broken prefix directory would be used and logged into.
|
||||||
|
Logger.logInfo(LOG_TAG, "Deleting broken termux prefix.");
|
||||||
error = FileUtils.deleteFile("termux prefix directory", TERMUX_PREFIX_DIR_PATH, true);
|
error = FileUtils.deleteFile("termux prefix directory", TERMUX_PREFIX_DIR_PATH, true);
|
||||||
if (error != null)
|
if (error != null)
|
||||||
Logger.logErrorExtended(LOG_TAG, error.toString());
|
Logger.logErrorExtended(LOG_TAG, error.toString());
|
||||||
|
|
||||||
showBootstrapErrorDialog(activity, whenDone, MarkdownUtils.getMarkdownCodeForString(executionCommand.toString(), true));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue