Improve error handling across all scripts#297
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
Conversation
- Add '|| return 1' to unchecked cd, wget, git clone, make, cmake,
tar, unzip, and mv commands in build/install functions
- Add -p flag to mkdir commands to prevent failures on existing dirs
- Fix piped wget|tar patterns in kweb.sh and reminiscence.sh by
splitting into separate commands with error checks
- Fix piped wget|apt-key pattern in kodi-extra.sh
- Fix dead error variable in openbor.sh - use md_ret_errors and return 1
- Fix install-extras.sh: add error checks on git pull, cp, rm, and
complex shell chains; use proper exit codes
- Fix complex chains in install-extras.sh using { ... || ...; } syntax
177 files changed across emulators, ports, libretrocores, and
supplementary scriptmodules.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Systematically adds error checking to ~570 unchecked commands across 177 shell scripts that previously failed silently.
Key patterns fixed:
|| return 1added to unchecked commands in build/install functions:cd— ~66 instances; a failedcdcauses all subsequent commands to run in the wrong directorywget/git clone— ~33 instances; failed downloads proceeded to build broken/missing sourcesmake/cmake— ~150 instances; failed builds were silently ignoredtar/unzip— ~18 instances; failed extractions left partial/missing filesmv— ~74 instances; failed moves left files in wrong locationsmkdir -pflag added to ~50mkdircalls to prevent failures on pre-existing directories.Piped command patterns fixed (silent failures when left side of pipe fails):
Dead error variable fixed in
openbor.sh:install-extras.shfixes:git pull origin— unchecked; now exits on failurecp,rm— used in&&chains that swallowed errors; replaced with explicitif ! cmd; then ... exit 1; ficp ... && rm ...chains — wrapped in{ ... || exit 1; }to catch both failuresexit→exit 0/exit 1for explicit exit codesLink to Devin session: https://app.devin.ai/sessions/a097d510c3ec42ff871f3bbf2d17cc75
Requested by: @Exarkuniv