Skip to content

Commit dbb51d3

Browse files
authored
Merge pull request #2805 from ehuss/remove-test-dest-dir
Remove `test --dest-dir`
2 parents 03f2806 + b4641d2 commit dbb51d3

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

guide/src/cli/test.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,6 @@ mdbook test my-book -L target/debug/deps/
5454
See the `rustdoc` command-line [documentation](https://doc.rust-lang.org/rustdoc/command-line-arguments.html#-l--library-path-where-to-look-for-dependencies)
5555
for more information.
5656

57-
#### `--dest-dir`
58-
59-
The `--dest-dir` (`-d`) option allows you to change the output directory for the
60-
book. Relative paths are interpreted relative to the book's root directory. If
61-
not specified it will default to the value of the `build.build-dir` key in
62-
`book.toml`, or to `./book`.
63-
6457
#### `--chapter`
6558

6659
The `--chapter` (`-c`) option allows you to test a specific chapter of the

src/cmd/test.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,11 @@ use anyhow::Result;
44
use clap::ArgAction;
55
use clap::builder::NonEmptyStringValueParser;
66
use mdbook_driver::MDBook;
7-
use std::path::PathBuf;
87

98
// Create clap subcommand arguments
109
pub fn make_subcommand() -> Command {
1110
Command::new("test")
1211
.about("Tests that a book's Rust code samples compile")
13-
// FIXME: --dest-dir is unused by the test command, it should be removed
14-
.arg_dest_dir()
1512
.arg_root_dir()
1613
.arg(
1714
Arg::new("chapter")
@@ -46,9 +43,6 @@ pub fn execute(args: &ArgMatches) -> Result<()> {
4643
let book_dir = get_book_dir(args);
4744
let mut book = MDBook::load(book_dir)?;
4845

49-
if let Some(dest_dir) = args.get_one::<PathBuf>("dest-dir") {
50-
book.config.build.build_dir = dest_dir.to_path_buf();
51-
}
5246
match chapter {
5347
Some(_) => book.test_chapter(library_paths, chapter),
5448
None => book.test(library_paths),

0 commit comments

Comments
 (0)