Skip to content

Commit fc8ecfc

Browse files
schelltombh
authored andcommitted
ensure output-dir is relative to toml when building with toml
1 parent f1a947b commit fc8ecfc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

crates/cargo-gpu/src/toml.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ impl Toml {
110110
command: Command::Build(mut build),
111111
} = Cli::parse_from(parameters)
112112
{
113+
// Ensure that the output directory is relative to the toml file
114+
if build.output_dir.is_relative() {
115+
let dir = path.parent().expect("no path parent");
116+
build.output_dir = dir.join(build.output_dir);
117+
}
118+
113119
log::debug!("build: {build:?}");
114120
build.run();
115121
} else {

0 commit comments

Comments
 (0)