Skip to content
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

feat: show debug infos in case of error #2

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions setup-vehub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,24 @@ curl -s -L "https://vector.com$URL" \
-H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) Chrome/115.0.5790.102' -o cli.zip

echo "Extracting veHub CLI..."
set +e
unzip -q cli.zip -d cli
UNZIP_STATUS=$?
set -e

# Debugging information in case of failure
if [ $UNZIP_STATUS -ne 0 ]; then
echo "Error: Failed to unzip the cli.zip file."
# Show file size
echo "File size of cli.zip:"
stat cli.zip

# Show hex dump of the first few bytes
echo "Hex dump of cli.zip content (first 256 bytes):"
xxd -l 256 cli.zip

exit 1
fi

# Make the binary executable
chmod +x cli/vehub
Expand Down