rust-lang / rust-lang/rustup

Actual error seems to be stripped from the error message

Open
#2,850 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
7k
Forks
1.1k
Avg merge
22h 40m
Merged PRs (30d)
46

Description

I am seeing the following error:

error: failed to run custom build command for `near-test-contracts v0.0.0 (/home/matklad/projects/nearcore/runtime/near-test-contracts)`

Caused by:
  process didn't exit successfully: `/home/matklad/projects/nearcore/target/release/build/near-test-contracts-c00a188e349b5e55/build-script-build` (exit status: 1)
  --- stderr
  info: downloading component 'rust-std' for 'wasm32-unknown-unknown'
  error: component download failed for rust-std-wasm32-unknown-unknown: could not rename downloaded file from '/home/matklad/.rustup/downloads/939f4a53a3b000e026d1da8df604ec4cdae1b3ced784388f152204b8d5331ec3.partial' to '/home/matklad/.rustup/downloads/939f4a53a3b000e026d1da8df604ec4cdae1b3ced784388f152204b8d5331ec3'
  command `"rustup" "target" "add" "wasm32-unknown-unknown"` exited with non-zero status: ExitStatus(ExitStatus(256))
warning: build failed, waiting for other jobs to finish...

I think it is coming from https://github.com/rust-lang/rustup/blob/c33cb5ed7fc2854eab7f3cfb1fa6d012b13a8f6c/src/utils/utils.rs#L636-L643

There's some underlying io::Error which should hopefully tell me why the rename fails but it isn't visible in the error mesage .

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read src/utils/utils.rs around lines 636-643, then reproduce the failure with rustup target add wasm32-unknown-unknown. Confirm that the underlying io::Error explaining the failed rename is included in the reported error message.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.