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

Manage errors properly when checksums don't match #96

@Angelmmiguel

Description

@Angelmmiguel

Describe the bug

When a checksum doesn't match after downloading a file, the CLI shows an error. However, it doesn't stop the execution and it fails while trying to save the file.

The error message is:

⚙️  Fetching data from the repository...
🚀 Installing the runtime...
❌ There was an error installing the runtime from the repository
👉 The checksums dont not match
thread '<unnamed>' panicked at 'cannot access a Thread Local Storage value during or after destruction: AccessError', /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/thread/local.rs:422:26
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5

We should avoid panicking and stopping the process at this point.

Reproduction steps

  1. Create an index with a wrong checksum
  2. Try to install the given runtime

Expected behavior

The error message doesn't contain a typo and it doesn't panik.

Additional context

No response

Metadata

Metadata

Assignees

Labels

🐛 bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions