Skip to content

Commit

Permalink
fix: canonicalize the output directory before checks (#738)
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun authored Oct 11, 2024
1 parent d522942 commit e50dc78
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,14 @@ pub async fn get_build_output(
recipe_path: &Path,
tool_config: &Configuration,
) -> miette::Result<Vec<Output>> {
let output_dir = args
let mut output_dir = args
.common
.output_dir
.clone()
.unwrap_or(current_dir().into_diagnostic()?.join("output"));
if output_dir.exists() {
output_dir = canonicalize(&output_dir).into_diagnostic()?;
}
if output_dir.starts_with(
recipe_path
.parent()
Expand Down

0 comments on commit e50dc78

Please sign in to comment.