fix: Fix specifying single output file

This commit is contained in:
Lucas Schwiderski 2022-11-13 22:18:12 +01:00
parent 4b830d613b
commit 54ca36c457
Signed by: lucas
GPG key ID: AA12679AAA6DF4D8

View file

@ -68,14 +68,10 @@ pub(crate) async fn run(ctx: Arc<RwLock<dtmt::Context>>, matches: &ArgMatches) -
.get_one::<PathBuf>("destination")
.expect("required parameter 'destination' is missing");
let is_dir = {
let meta = fs::metadata(out_path)
let is_dir = fs::metadata(out_path)
.await
.wrap_err("failed to access destination path")
.with_section(|| out_path.display().to_string().header("Path:"))?;
meta.is_dir()
};
.map(|meta| meta.is_dir())
.unwrap_or(false);
let paths = collect_bundle_paths(bundles).await;