Skip to content

Commit

Permalink
fix: Get cargo xtask doc --open working again
Browse files Browse the repository at this point in the history
Turns out at some point, probably with the Clap upgrade, that we'd
broken the `--open` flag on the `cargo xtask doc` CLI. This commit fixes
it, so you can use `cargo xtask doc --open` to see the internal API docs
of the `hc` crate.

Signed-off-by: Andrew Lilley Brinker <[email protected]>
  • Loading branch information
alilleybrinker committed May 7, 2024
1 parent b341a35 commit c5092ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ fn main() {
.subcommand(
Command::new("doc").arg(
Arg::new("open")
.value_name("open")
.index(1)
.short('o')
.long("open")
.action(ArgAction::SetTrue),
),
)
Expand Down
2 changes: 1 addition & 1 deletion xtask/src/task/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fn run_cargo_doc(should_open: OpenDoc) -> Result<()> {
out_dir.pop();

// Add the rest of the path to the Hipcheck index file.
pathbuf![&out_dir, ".target", "doc", "hipcheck", "index.html"]
pathbuf![&out_dir, ".target", "doc", "hc", "index.html"]
};

open::that(path)?;
Expand Down

0 comments on commit c5092ab

Please sign in to comment.