diff options
| author | Josh Stone <jistone@redhat.com> | 2023-08-22 10:42:12 -0700 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2023-08-22 10:42:12 -0700 |
| commit | 35187c7e6474d346eea3113c4ae34d26d6b18756 (patch) | |
| tree | 15584cec087dbe47ad23dec709e99ac7c7241923 | |
| parent | 3e9e5745dfd3ad9a553a4c7d2b3d125dc1473fa6 (diff) | |
| download | rust-35187c7e6474d346eea3113c4ae34d26d6b18756.tar.gz rust-35187c7e6474d346eea3113c4ae34d26d6b18756.zip | |
Skip ExpandYamlAnchors when the config is missing
The dist-src tarball does not include `.github/` at all, so we can't check whether it needs to be regenerated.
| -rw-r--r-- | src/bootstrap/test.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index db3b7ffbea4..d1018978f78 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -1174,6 +1174,11 @@ impl Step for ExpandYamlAnchors { /// appropriate configuration for all our CI providers. This step ensures the tool was called /// by the user before committing CI changes. fn run(self, builder: &Builder<'_>) { + // Note: `.github/` is not included in dist-src tarballs + if !builder.src.join(".github/workflows/ci.yml").exists() { + builder.info("Skipping YAML anchors check: GitHub Actions config not found"); + return; + } builder.info("Ensuring the YAML anchors in the GitHub Actions config were expanded"); builder.run_delaying_failure( &mut builder.tool_cmd(Tool::ExpandYamlAnchors).arg("check").arg(&builder.src), |
