This repository was archived by the owner on Aug 7, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 56
fix: add downloading dependencies to install script #524
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -10,6 +10,9 @@ fi | |||||||||||||||
|
|
||||||||||||||||
| cd rollkit || { echo "Failed to find the downloaded repository."; exit 1; } | ||||||||||||||||
| git fetch && git checkout $1 | ||||||||||||||||
| echo "Installing dependencies..." | ||||||||||||||||
| go mod tidy | ||||||||||||||||
| go mod download | ||||||||||||||||
|
Comment on lines
+13
to
+15
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add error handling for dependency management steps While adding dependency management is crucial for fixing the binary issues, these steps need proper error handling to prevent silent failures. Consider this improvement: echo "Installing dependencies..."
-go mod tidy
-go mod download
+go mod tidy || { echo "Failed to tidy Go modules. Please check your Go environment."; exit 1; }
+go mod download || { echo "Failed to download dependencies. Please check your network connection."; exit 1; }
+echo "Dependencies installed successfully."📝 Committable suggestion
Suggested change
|
||||||||||||||||
| echo "Building and installing Rollkit..." | ||||||||||||||||
| make install | ||||||||||||||||
| cd .. | ||||||||||||||||
|
|
||||||||||||||||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Validate version parameter before checkout
The script uses
$1without validation, which could lead to checkout failures or unexpected versions.Add version validation:
📝 Committable suggestion