Improve Installation Script Robustness and Compliance#30
Open
matbrgz wants to merge 1 commit intoowenizedd:mainfrom
Open
Improve Installation Script Robustness and Compliance#30matbrgz wants to merge 1 commit intoowenizedd:mainfrom
matbrgz wants to merge 1 commit intoowenizedd:mainfrom
Conversation
This was referenced Mar 4, 2025
Owner
|
Did you test this change? |
owenizedd
reviewed
Mar 5, 2025
| info_bold() { echo -e "\e[1m$*\e[0m"; } | ||
|
|
||
| # --- Dependency Check --- | ||
| for cmd in bun curl tar uname mkdir mv rm; do |
Owner
There was a problem hiding this comment.
this is contradictory with line 18 no? you check bun here but will never reach line 18 (installing bun)
Owner
|
I see that you added the |
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.
Overview
This pull request introduces significant improvements to the installation script for bum. The modifications focus on increasing robustness, security, and maintainability while ensuring the script adheres to ShellCheck recommendations and providing a more user-friendly experience.
Key Changes
Helper Functions:
error(),info(), andinfo_bold()functions to standardize error handling and logging.Dependency Checks:
bun,curl,tar,uname,mkdir,mv,rm) to ensure all dependencies are met before execution.Bun Installation:
Architecture Detection:
uname -mswith a robust case statement to correctly set the target platform.Download and Extraction Enhancements:
curlwith progress feedback.mktempand sets atrapto guarantee cleanup in case of errors.ShellCheck Compliance:
rm -rfcommand using${var:?}to prevent dangerous expansions.tildifyfunction to correctly handle tilde expansion by quoting variable expansions appropriately.Environment Configuration:
add_commands_to_fileto append environment variable configuration to the user's shell configuration file (supports Fish, Zsh, and Bash).Impact
These changes make the installation script:
Feel free to review the changes and provide feedback.