Skip to content

Commit

Permalink
Merge pull request #1396 from ahaoboy/master
Browse files Browse the repository at this point in the history
fix: optimize out-dir display (close: #1395)
  • Loading branch information
drager authored Jun 26, 2024
2 parents bd94075 + d6d8377 commit abe080f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ toml = "0.7.3"
ureq = { version = "2.6.2", features = ["json"] }
walkdir = "2.3.2"
which = "4.4.0"
path-clean = "1.0.1"

[dev-dependencies]
assert_cmd = "2.0.8"
Expand Down
3 changes: 2 additions & 1 deletion src/command/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use anyhow::{anyhow, bail, Error, Result};
use binary_install::Cache;
use clap::Args;
use log::info;
use path_clean::PathClean;
use std::fmt;
use std::path::PathBuf;
use std::str::FromStr;
Expand Down Expand Up @@ -217,7 +218,7 @@ impl Build {
}
let crate_path = get_crate_path(build_opts.path)?;
let crate_data = manifest::CrateData::new(&crate_path, build_opts.out_name.clone())?;
let out_dir = crate_path.join(PathBuf::from(build_opts.out_dir));
let out_dir = crate_path.join(PathBuf::from(build_opts.out_dir)).clean();

let dev = build_opts.dev || build_opts.debug;
let profile = match (dev, build_opts.release, build_opts.profiling) {
Expand Down

0 comments on commit abe080f

Please sign in to comment.