Skip to content

Rustwide fails due to symlink resolution with new rustup #94

Closed
@skius

Description

@skius

Since rustup 1.28 PR rust-lang/rustup#4023, cargo-home/bin/cargo is symlinked to cargo-home/bin/rustup. As part of running a command, the binary's path is utils::normalize_path'd, which includes symlink resolution. As a result, cargo commands end up being called as rustup, for example, rustup install git-credential-null which results in an error.

I'm not sure, but a hacky fix could be to store the filename before resolution (the canonicalize call) and restore it afterwards?

rustwide/src/utils.rs

Lines 111 to 112 in 744375a

pub(crate) fn normalize_path(path: &Path) -> PathBuf {
let mut p = std::fs::canonicalize(path).unwrap_or_else(|_| path.to_path_buf());

For the short term, is there a way to override the rustup version being used short of changing the hardcoded URL?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions