fix: error when install path does not exist#2982
Draft
waveywaves wants to merge 1 commit intochainloop-dev:mainfrom
Draft
fix: error when install path does not exist#2982waveywaves wants to merge 1 commit intochainloop-dev:mainfrom
waveywaves wants to merge 1 commit intochainloop-dev:mainfrom
Conversation
Add install.sh to the main repository (previously only in the now-archived chainloop-dev/docs repo) with the following improvements: 1. Add early validation after argument parsing to verify the --path installation directory exists before downloading anything. Provides a clear error message with a suggested fix (mkdir -p) instead of failing silently or showing confusing sudo errors. 2. Improve the install step to provide proper error output when the binary installation fails, instead of silently redirecting stderr to /dev/null. Fixes chainloop-dev#2977 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Vibhav Bobade <vibhav.bobde@gmail.com>
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
install.shto the main repository (migrated from the now-archivedchainloop-dev/docsrepo atstatic/install.sh) with two bug fixes:--pathinstallation directory exists before downloading anything, with a clear error message and actionable suggestion (mkdir -p)2>/dev/nullstderr suppression in the install step with proper error handling and user-facing messagesNote: The install script was previously hosted only in the archived
chainloop-dev/docsrepo and served viadl.chainloop.dev. The CDN/deployment pipeline will need to be updated to serve this script from the new location.Fixes #2977
Test plan
bash install.sh --path /nonexistent/pathand verify it exits early with:The installation path '/nonexistent/path' does not exist. Please create it first with: mkdir -p /nonexistent/pathbash install.sh --path /tmp/test-install(aftermkdir -p /tmp/test-install) and verify normal installation succeedsbash install.shwith default path (/usr/local/bin) and verify existing behavior is preserved🤖 Generated with Claude Code