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

RFC: Be able to provide "local configuration" while installing a "local crate" #6498

Closed
xelephas opened this issue Dec 29, 2018 · 1 comment · Fixed by #6804
Closed

RFC: Be able to provide "local configuration" while installing a "local crate" #6498

xelephas opened this issue Dec 29, 2018 · 1 comment · Fixed by #6804
Labels
A-configuration Area: cargo config files and env vars C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-install S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review

Comments

@xelephas
Copy link

xelephas commented Dec 29, 2018

Describe the problem you are trying to solve

After #6026, cargo install will only use the configuration file at ~/.cargo/config
However, it would be nice to be able to provide a "local configuration" while installing a "local crate"

Describe the solution you'd like

While installing a local crate using cargo install --path {proj-folder}, either:

Only look for {proj-folder}/.cargo/config,

or

First look for {proj-folder}/.cargo/config, and then fall back to ~/.cargo/config if it doesn't exist.

@xelephas xelephas added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Dec 29, 2018
@dwijnand dwijnand added the S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review label Dec 30, 2018
@dwijnand
Copy link
Member

dwijnand commented Dec 30, 2018

In #6026 @alexcrichton indicated this behaviour could land in a future PR, so I've marked this proposal as accepted.

(Edit: and by "this behaviour" I mean the second one listed, with the fallback.)

@ehuss ehuss added the A-configuration Area: cargo config files and env vars label Mar 31, 2019
bors added a commit that referenced this issue Apr 1, 2019
Allow `cargo install --path P` to load config from P.

`cargo install` was changed to ignore configs except for the home directory (#6026). However, it seems like there are legitimate needs when using `--path`, so allow loading from that path, too.

Closes #6498.
Closes #6397.
@bors bors closed this as completed in #6804 Apr 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-configuration Area: cargo config files and env vars C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-install S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants