Skip to content

Have mocked cargo better adhere to cargo conventions#4203

Merged
rami3l merged 1 commit intorust-lang:masterfrom
smoelius:adhere-to-cargo-conventions
Mar 2, 2025
Merged

Have mocked cargo better adhere to cargo conventions#4203
rami3l merged 1 commit intorust-lang:masterfrom
smoelius:adhere-to-cargo-conventions

Conversation

@smoelius
Copy link
Copy Markdown
Contributor

@smoelius smoelius commented Mar 1, 2025

Currently, when the mocked cargo command is passed --recursive-cargo-subcommand, it runs:

cargo-foo --recursive-cargo

However, cargo subcommands are normally passed their subcommand name as the first argument. Thus, one would expect the following to be run:

cargo-foo foo --recursive-cargo

This commit changes the mocked cargo command to do the latter. It also adds a check to ensure that the "subcommand name as first argument" behavior is respected.

This is, admittedly, a rather pedantic change.

Extracted from #4175

Currently, when the mocked cargo command is passed
`--recursive-cargo-subcommand`, it runs:

```
cargo-foo --recursive-cargo
```

However, cargo subcommands are normally passed their subcommand name as
the first argument. Thus, one would expect the following to be run:

```
cargo-foo foo --recursive-cargo
```

This commit changes the mocked cargo command to do the latter. It also
adds a check to ensure that the "subcommand name as first argument"
behavior is respected.

This is, admittedly, a rather pedantic change.

Extracted from #4175
Copy link
Copy Markdown
Member

@rami3l rami3l left a comment

Choose a reason for hiding this comment

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

LGTM :)

@rami3l rami3l added this pull request to the merge queue Mar 2, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 2, 2025
@rami3l rami3l added this pull request to the merge queue Mar 2, 2025
Merged via the queue into rust-lang:master with commit 6744fb5 Mar 2, 2025
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants