Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to normalize directory if --remap-path-prefix is in use #192

Open
Nemo157 opened this issue Sep 26, 2022 · 0 comments
Open

Fails to normalize directory if --remap-path-prefix is in use #192

Nemo157 opened this issue Sep 26, 2022 · 0 comments

Comments

@Nemo157
Copy link

Nemo157 commented Sep 26, 2022

I have globally setup my machine to remap some prefixes which include my home directory where I build projects from.

# ~/.cargo/config.toml
[target.x86_64-unknown-linux-gnu]
rustflags = [
  "--remap-path-prefix=/home/nemo157=\u001b[36;1m~\u001b[0m",
]

When running trybuild based tests this remapping blocks the path normalization from working.

I've tried changing a few things but wasn't able to come up with an entirely satisfying solution to this myself. The only one that managed to work was unconditionally setting RUSTFLAGS rather than only overriding that if it exists in the environment, that makes cargo ignore any .cargo/config set rustflags. (The other main change I attempted was to add a [target.$TARGET] section to the generated .cargo/config, that still fails as the flags from these get merged rather than overriding each other).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant