cargo
cargo copied to clipboard
feat: add CARGO_MANIFEST_PATH env variable
Adds CARGO_MANIFEST_PATH variable as part of https://github.com/rust-lang/cargo/issues/12207
Context: CARGO_MANIFEST_DIR is not very useful, because there is no Cargo.toml file when running a cargo script. In cases when multiple scripts are stored in the same folder, we can't tell which script exactly is being run using CARGO_MANIFEST_DIR
r? @epage
rustbot has assigned @epage. They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.
Use r? to explicitly pick a reviewer
@rfcbot merge
This PR insta-stabilizes CARGO_MANIFEST_PATH, a companion to CARGO_MANIFEST_DIR for when you actually want the manifest because CARGO_MANIFEST_DIR.join("Cargo.toml") will no longer be sufficient due to cargo-script.
Team member @epage has proposed to merge this. The next step is review by the rest of the tagged team members:
- [x] @Eh2406
- [ ] @Muscraft
- [x] @arlosi
- [x] @ehuss
- [x] @epage
- [x] @joshtriplett
- [x] @weihanglo
No concerns currently listed.
Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!
See this document for info about what commands tagged team members can give me.
:bell: This is now entering its final comment period, as per the review above. :bell:
Thanks for working with us! Glad to have you along!
I am going to merge this. This feature is not controversial at all, so no need to wait for the full 10-days FCP. Please speak up if you have any concern.
@bors r+
:pushpin: Commit d4ac9295639bd2f56cda9e25c01b1ebf0fb11b8a has been approved by weihanglo
It is now in the queue for this repository.
:hourglass: Testing commit d4ac9295639bd2f56cda9e25c01b1ebf0fb11b8a with merge 7cbdcf0b21ae99ac3bbc6411191f7b76ecf2fb90...
:sunny: Test successful - checks-actions Approved by: weihanglo Pushing 7cbdcf0b21ae99ac3bbc6411191f7b76ecf2fb90 to master...