Skip to content

Commit

Permalink
Explicitly run +nightly for -Zcheck-cfg pass in ci. (bevyengine#1…
Browse files Browse the repository at this point in the history
…2230)

# Objective

Getting this error running ci locally.

```
$ cargo check -Zcheck-cfg --workspace
error: the `-Z` flag is only accepted on the nightly channel of Cargo, but this is the `stable` channel
See https://doc.rust-lang.org/book/appendix-07-nightly-rust.html for more information about Rust release channels.
thread 'main' panicked at tools\ci\src\main.rs:166:14:
Please fix failing cfg checks in output above.: command exited with non-zero code `cargo check -Zcheck-cfg --workspace`: 101
```

## Solution

- Add `+nightly` flag to the `check-cfg` pass.

---

Obviously we shouldn't be running `nightly` Cargo, but at least now
local running of `cargo run -p ci` will pass.
  • Loading branch information
targrub authored Mar 1, 2024
1 parent 6b212a8 commit fc0aa4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/ci/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ fn main() {
if what_to_run.contains(Check::CFG_CHECK) {
// Check cfg and imports
std::env::set_var("RUSTFLAGS", "-D warnings");
cmd!(sh, "cargo check -Zcheck-cfg --workspace")
cmd!(sh, "cargo +nightly check -Zcheck-cfg --workspace")
.run()
.expect("Please fix failing cfg checks in output above.");
}
Expand Down

0 comments on commit fc0aa4f

Please sign in to comment.