Skip to content

Commit

Permalink
ensure output-dir is relative to toml when building with toml
Browse files Browse the repository at this point in the history
  • Loading branch information
schell authored and tombh committed Dec 21, 2024
1 parent f1a947b commit fc8ecfc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/cargo-gpu/src/toml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ impl Toml {
command: Command::Build(mut build),
} = Cli::parse_from(parameters)
{
// Ensure that the output directory is relative to the toml file
if build.output_dir.is_relative() {
let dir = path.parent().expect("no path parent");
build.output_dir = dir.join(build.output_dir);
}

log::debug!("build: {build:?}");
build.run();
} else {
Expand Down

0 comments on commit fc8ecfc

Please sign in to comment.