cargo-wasix does not work when the toolchain is installed in a deleted directory
Arshia001 opened this issue · 0 comments
Arshia001 commented
If the toolchain is installed and the directory where it's installed is later removed, cargo-wasix fails to detect the missing toolchain and fails instead.
Steps to reproduce:
- Remove or rename the toolchain directory:
mv /home/arshia/.local/share/cargo-wasix/toolchains/x86_64-unknown-linux-gnu_v2023-07-21.1/rust /home/arshia/.local/share/cargo-wasix/toolchains/x86_64-unknown-linux-gnu_v2023-07-21.1/rust-backup
- Run
rustup toolchain list
. Thewasix
toolchain will still be listed. - Run
rustup default wasix
. Rustup will complain that the toolchain is not installed. - Run
cargo wasix build
. It will fail to detect the missing toolchain and report an error instead:
$ cargo wasix build
error: toolchain 'wasix' is not installed
error: Could not execute rustc
Caused by:
failed to execute "rustc" "+wasix" "--print" "sysroot"
status: exit status: 1
Expected behaviour:
cargo-wasix
should detect the missing/invalid toolchain and download it again.