mirror of
https://github.com/rust-lang/mdBook.git
synced 2025-12-27 11:33:55 -05:00
Merge pull request #2785 from ehuss/ensure-test-built
Don't rebuild books in tests
This commit is contained in:
@@ -231,6 +231,12 @@ impl BookTest {
|
||||
};
|
||||
f(&mut cmd);
|
||||
cmd.run();
|
||||
// Ensure that `built` gets set if a build command is used so that all
|
||||
// the `check` methods do not overwrite the contents of what was just
|
||||
// built.
|
||||
if cmd.args.first().map(String::as_str) == Some("build") {
|
||||
self.built = true
|
||||
}
|
||||
self
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user