这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@Angelmmiguel
Copy link
Contributor

Properly manage errors when running commands by using the Result return value. Before, I was exiting the CLI earlier and that was causing the app to panik. The reason is that, Actix uses Tokio under the hood for managing async code. Tokio need to manage the entire application to ensure the threads are properly finished. By exiting early, we force the program to panik.

I also fixed a small typo.

Result

./wws install ruby latest
⚙️  Fetching data from the repository...
🚀 Installing the runtime...
❌ There was an error installing the runtime from the repository
👉 The checksums don't match
Error: Custom { kind: InvalidData, error: "" }

I couldn't remove the "Error: Custom" message for now. However, this is much better than the previous output so I'll investigate why this is happening in a future version.

It closes #96

@Angelmmiguel Angelmmiguel added the 🐛 bug Something isn't working label Feb 20, 2023
@Angelmmiguel Angelmmiguel added this to the v1.0.0 milestone Feb 20, 2023
@Angelmmiguel Angelmmiguel requested a review from a team February 20, 2023 10:07
@Angelmmiguel Angelmmiguel self-assigned this Feb 20, 2023
@Angelmmiguel
Copy link
Contributor Author

Since I plan to revisit how to improve this in the future, I will merge these changes.

@Angelmmiguel Angelmmiguel merged commit 9451c55 into main Feb 21, 2023
@Angelmmiguel Angelmmiguel deleted the 96-manage-checksum-errors-properly branch May 8, 2023 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working cla-not-required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Manage errors properly when checksums don't match

3 participants