Skip to content

CARGO_HOME and RUSTUP_HOME should be included in .cargo/env #2842

@Pascalio

Description

@Pascalio

Problem
Installing to a custom location works fine with
export CARGO_HOME=custom/.cargo export RUSTUP_HOME=custom/.rustup
.bashrc is then updated to source custom/.cargo/env. But then, if the latter file doesn't re-export the custom env vars, cargo and the other tools won't recognise the installation path. This was already mentioned here #2656 (comment)

Possible Solution(s)

At least if those env vars haven't got their default values, exporting them from .cargo/env should do the trick, shouldn't it?

Notes

Output of rustup --version: rustup 1.24.3 (ce5817a 2021-05-31)
Output of rustup show: Default host: x86_64-unknown-linux-gnu

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions