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

Specify config file on the command line #6648

Closed
brson opened this issue Feb 10, 2019 · 3 comments
Closed

Specify config file on the command line #6648

brson opened this issue Feb 10, 2019 · 3 comments
Labels
A-cli Area: Command-line interface, option parsing, etc. 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`

Comments

@brson
Copy link
Contributor

brson commented Feb 10, 2019

Several times I've wanted to have a config file (not a full manifest) in my repo that is not on the config search path, but that I can invoke on demand to change cargo's behavior.

One example of this is tikv/tikv#4189, where I am trying to add a "custom profile" by using config profiles. I only want to use this profile in certain situations, and would rather not enable it by copying the config file into cargo's search path, but by directly telling cargo to use that config.

Describe the solution you'd like

cargo build --config etc/release.config, like cargo build --manifest-path.

@brson brson added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Feb 10, 2019
@spacekookie
Copy link
Member

I guess this would only be valid for build and test subcommands? Don't wanna allow publishing with a manifest that might be outside the repository scope.

Are there other applications where this could be relevant?

@alexcrichton
Copy link
Member

@ehuss has written a possible design for solving this at #6699

@ehuss ehuss added A-cli Area: Command-line interface, option parsing, etc. A-configuration Area: cargo config files and env vars labels Sep 21, 2019
@ehuss
Copy link
Contributor

ehuss commented Apr 23, 2020

Closing in favor of tracking issue #7722.

@ehuss ehuss closed this as completed Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Area: Command-line interface, option parsing, etc. 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`
Projects
None yet
Development

No branches or pull requests

4 participants