Skip to content

Commit 004b8b9

Browse files
committed
add a "standalone" path for doc::Standalone to be able to exclude it
Before this commit, the path for the doc::Standalone step was "src/doc", which is accurate as the standalone docs source files live at the root of the "src/doc" directory tree. Unfortunately, that caused bad interactions when trying to exclude it with `--exclude src/doc`. When an exclusion is passed to bootstrap, it will exclude all steps whose path *ends with* the exclusion, which results in the Cargo book (src/tools/cargo/src/doc) to also be excluded. To work around this problem, this commit adds the "standalone" path as an alternate path for doc::Standalone, allowing `--exclude standalone` to work without side effects.
1 parent afe29e4 commit 004b8b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bootstrap/doc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ impl Step for Standalone {
299299

300300
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
301301
let builder = run.builder;
302-
run.path("src/doc").default_condition(builder.config.docs)
302+
run.path("src/doc").path("standalone").default_condition(builder.config.docs)
303303
}
304304

305305
fn make_run(run: RunConfig<'_>) {

0 commit comments

Comments
 (0)