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

feat: Add --rust-version flag #202

Merged
merged 2 commits into from
Sep 6, 2023
Merged

feat: Add --rust-version flag #202

merged 2 commits into from
Sep 6, 2023

Conversation

epage
Copy link
Contributor

@epage epage commented Sep 5, 2023

Fixes #196

@taiki-e
Copy link
Owner

taiki-e commented Sep 5, 2023

The CI failure is due to --version-range being used to test compatibility with older versions of Cargo. It can be avoided by preventing passing --version-range when --rust-version is already passed.

if let Some(toolchain) = test_version() {
if !args.iter().any(|a| a.as_ref().to_str().unwrap().starts_with("--version-range")) {
cmd.arg(format!("--version-range=1.{toolchain}..=1.{toolchain}"));
}
}

@epage
Copy link
Contributor Author

epage commented Sep 6, 2023

Looks like its passing now

Copy link
Owner

@taiki-e taiki-e left a comment

Choose a reason for hiding this comment

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

LGTM

src/cli.rs Outdated Show resolved Hide resolved
Copy link
Owner

@taiki-e taiki-e left a comment

Choose a reason for hiding this comment

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

Thanks!

@taiki-e taiki-e merged commit 58d1d91 into taiki-e:main Sep 6, 2023
24 checks passed
@epage epage deleted the msrv branch September 6, 2023 13:56
@taiki-e taiki-e added the A-version Area: --rust-version, --version-range, --version-step label Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-version Area: --rust-version, --version-range, --version-step
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flag to run cargo commands with the appropriate MSRV
2 participants