Skip to content

Commit

Permalink
don't mess with the output_dir parameter in the toml file
Browse files Browse the repository at this point in the history
  • Loading branch information
schell committed Dec 27, 2024
1 parent c34e883 commit 40d1380
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 3 additions & 1 deletion crates/cargo-gpu/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ impl Build {
// Ensure the shader output dir exists
log::debug!("ensuring output-dir '{}' exists", self.output_dir.display());
std::fs::create_dir_all(&self.output_dir)?;
self.output_dir = self.output_dir.canonicalize()?;
let canonicalized = self.output_dir.canonicalize()?;
log::debug!("canonicalized output dir: {canonicalized:?}");
self.output_dir = canonicalized;

// Ensure the shader crate exists
self.install.shader_crate = self.install.shader_crate.canonicalize()?;
Expand Down
6 changes: 0 additions & 6 deletions crates/cargo-gpu/src/toml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,6 @@ 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().context("no path parent")?;
build.output_dir = dir.join(build.output_dir);
}

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

0 comments on commit 40d1380

Please sign in to comment.