Skip to content

Commit fc946f8

Browse files
committed
allow different default targets
1 parent eb9f380 commit fc946f8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/docbuilder/rustwide_builder.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,14 @@ impl RustwideBuilder {
435435
.run()
436436
.is_ok()
437437
});
438+
if let Some(explicit_target) = target {
439+
// mv target/$explicit_target/doc target/doc
440+
let target_dir = build.host_target_dir();
441+
let old_dir = target_dir.join(explicit_target).join("doc");
442+
let new_dir = target_dir.join("doc");
443+
debug!("rename {} to {}", old_dir.display(), new_dir.display());
444+
std::fs::rename(old_dir, new_dir)?;
445+
}
438446

439447
Ok(BuildResult {
440448
build_log: storage.to_string(),

0 commit comments

Comments
 (0)