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

Documented working directory behaviour for cargo test, cargo bench and cargo run #11901

Merged
merged 1 commit into from Mar 29, 2023

Conversation

jofas
Copy link
Contributor

@jofas jofas commented Mar 28, 2023

Fixes #11852. Updated the respective man-pages of cargo test, cargo bench and cargo run to include the information of the working directory of the executables. Added a comment in the code of cargo run where the default behaviour (the package's root directory) is overridden.

@rustbot
Copy link
Collaborator

rustbot commented Mar 28, 2023

r? @epage

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-cli-help Area: built-in command-line help A-documenting-cargo-itself Area: Cargo's documentation Command-run S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 28, 2023
Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you for making this PR.

src/doc/man/cargo-run.md Outdated Show resolved Hide resolved
Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This definitely makes the current situation better. Go ahead and merge!

@weihanglo
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Mar 29, 2023

📌 Commit 355ddf5 has been approved by weihanglo

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 29, 2023
@bors
Copy link
Collaborator

bors commented Mar 29, 2023

⌛ Testing commit 355ddf5 with merge 5d3a85e...

@bors
Copy link
Collaborator

bors commented Mar 29, 2023

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing 5d3a85e to master...

@bors bors merged commit 5d3a85e into rust-lang:master Mar 29, 2023
16 checks passed
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 1, 2023
Update cargo

9 commits in 145219a9f089f8b57c09f40525374fbade1e34ae..0e474cfd7b16b018cf46e95da3f6a5b2f1f6a9e7
2023-03-27 01:56:36 +0000 to 2023-03-31 23:15:58 +0000
- Add delays to network retries. (rust-lang/cargo#11881)
- Add a note to `cargo logout` that it does not revoke the token. (rust-lang/cargo#11919)
- Sync external-tools JSON docs. (rust-lang/cargo#11918)
- Drop derive feature from serde in cargo-platform (rust-lang/cargo#11915)
- Disable test_profile test on windows-gnu (rust-lang/cargo#11916)
- src/doc/src/reference/build-scripts.md: a{n =>} benchmark target (rust-lang/cargo#11908)
- Documented working directory behaviour for `cargo test`, `cargo bench` and `cargo run` (rust-lang/cargo#11901)
- docs(contrib): Link to office hours doc (rust-lang/cargo#11903)
- chore: Upgrade to clap v4.2 (rust-lang/cargo#11904)
@ehuss ehuss added this to the 1.70.0 milestone Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli-help Area: built-in command-line help A-documenting-cargo-itself Area: Cargo's documentation Command-run S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Working directory different between cargo run and test
6 participants