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

Closed
Tracked by #322
blackgirlbytes opened this issue Oct 8, 2024 · 4 comments · Fixed by #391
Closed
Tracked by #322

🐛 Bug: Fix Web5 CLI Installation Script #384

blackgirlbytes opened this issue Oct 8, 2024 · 4 comments · Fixed by #391
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
Contributor

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.

@blackgirlbytes
Copy link
Contributor Author

@mushahidq let us know how this is going for you or if you need any assistance!

mushahidq added a commit to mushahidq/web5-rs that referenced this issue Oct 11, 2024
@mushahidq
Copy link
Contributor

Hi @blackgirlbytes. Thanks! I'm working on it. I'll post here if I need any help.

@mushahidq mushahidq mentioned this issue Oct 11, 2024
20 tasks
angiejones pushed a commit that referenced this issue Oct 16, 2024
* fixes #384 - fix for web cli installation script error

* Added verbose messages

* Update filename for newer versions and fix incorrect variable in clean_up_temp

Update filename for newer versions and fix incorrect variable in clean_up_temp

* Fix directory exist check

* Update crates/web5_cli/install.sh - fix in bin directory check

Co-authored-by: nitro-neal <[email protected]>

---------

Co-authored-by: nitro-neal <[email protected]>
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: Done
Development

Successfully merging a pull request may close this issue.

2 participants