-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Allow to set lockfile-path
via an environment variable
#15510
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
Comments
Could you describe your use case? |
Sure! I'd like to be able to mount the Rust project directory read-only into a container environment (e.g., This however currently would require me to append (Btw, it seems I'm not alone in this: https://users.rust-lang.org/t/specifying-the-location-of-the-cargo-lock-file/8977/5 describes exactly my use-case, essentially) |
Out of curiosity, why do you generate Cargo.lock on the fly, instead of checking it in the version control system? |
For one, the projects this is referring to are all libraries, where we still adhere to the (by now somewhat relaxed) guidance to not check-in |
I can see having the lockfile-path more easily reused between multiple commands. As this flag is not expected to be commonly used, I wonder if we should remove I think I would name the config If this is put in the config, I wonder if we should support variable substitution like |
Uh oh!
There was an error while loading. Please reload this page.
Problem
In #14326, the capability to specify an
lockfile-path
was added to cargo. It would be awesome if this would also possible to configure via an environment variable, similar toCARGO_TARGET_DIR
.Proposed Solution
Add the capability to set the lockfile path via a
CARGO_LOCKFILE_PATH
environment variable.Notes
See also #14421
The text was updated successfully, but these errors were encountered: