Skip to content

Commit

Permalink
fix: Improve error reporting on failed git clone
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperupcall committed Sep 19, 2023
1 parent df95293 commit c7f5a46
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ setup () {
rm -rf "$DEST"

echo " info: Fetching 'bpkg@$BRANCH'..."
git clone --depth=1 --branch "$BRANCH" "$REMOTE" "$DEST" > /dev/null 2>&1
if ! output=$(git clone --depth=1 --branch "$BRANCH" "$REMOTE" "$DEST" 2>&1); then
printf '%s\n' " error: Failed to clone repository." >&2
printf '%s\n' "GIT ERROR OUTPUT:"
printf '%s\n' "$output"
exit 1
fi
cd "$DEST" || exit

echo " info: Installing..."
Expand Down

0 comments on commit c7f5a46

Please sign in to comment.