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

🐛 Bug: Fix Web5 CLI Installation Script #384

Open
Tracked by #322
blackgirlbytes opened this issue Oct 8, 2024 · 2 comments
Open
Tracked by #322

🐛 Bug: Fix Web5 CLI Installation Script #384

blackgirlbytes opened this issue Oct 8, 2024 · 2 comments
Assignees
Labels
bug Something isn't working hacktoberfest medium

Comments

@blackgirlbytes
Copy link
Contributor

🐛 Bug: Fix Web5 CLI Installation Script

🔍 Problem Description

The current installation script for the Web5 CLI is encountering errors during execution. Users are experiencing issues that prevent successful installation.

🚫 Current Behavior

When running the installation command:

curl -L https://raw.githubusercontent.com/TBD54566975/web5-rs/main/crates/web5_cli/install.sh | bash -s v0.0.4

Users encounter an error message, preventing successful installation:

rm: /tmp/web5-aarch64-apple-darwin: No such file or directory

✅ Expected Behavior

The installation script should:

  1. Correctly download and install the Web5 CLI.
  2. Handle cleanup operations without errors.
  3. Provide clear success or error messages to the user.

💡 Proposed Solution

  1. Implement proper error handling and checks throughout the script.
  2. Ensure the cleanup operation only attempts to remove files that exist.
  3. Add verbose output to help users understand what's happening during the installation process.

🔄 Steps to Reproduce

  1. Run the following command:
    curl -L https://raw.githubusercontent.com/TBD54566975/web5-rs/main/crates/web5_cli/install.sh | bash -s v0.0.4
  2. Observe the error messages.

ℹ️ Additional Information

  • 🖥️ OS: macOS (as indicated by the Darwin reference in the error message)
  • 🏗️ Architecture: ARM64 (based on the aarch64 filename in the error)
  • 🏷️ Web5 CLI version: v0.0.4

🚀 Possible Improvements

  1. Add a check to verify if the download was successful before attempting to move or chmod the file.
  2. Implement a function to check and create the /usr/local/bin directory if it doesn't exist.
  3. Use a trap to ensure cleanup of temporary files even if the script exits prematurely.
  4. Add more informative error messages to help users troubleshoot installation issues.
@mushahidq
Copy link

Hi,

I'd like to work on this issue if someone else hasn't already taken this up

@blackgirlbytes
Copy link
Contributor Author

yep you're assigned to it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hacktoberfest medium
Projects
Status: No status
Development

No branches or pull requests

2 participants