-
Notifications
You must be signed in to change notification settings - Fork 57
fix: add downloading dependencies to install script #524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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
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 .. | ||||||||||||||||
|
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
$1
without validation, which could lead to checkout failures or unexpected versions.Add version validation:
📝 Committable suggestion