Skip to content

Commit e3c0cd1

Browse files
authored
Fix differing path display on Windows (#111)
1 parent 265bba7 commit e3c0cd1

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

Cargo.lock

Lines changed: 9 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ test-log = "0.2.18"
2929
cargo_metadata = "0.21.0"
3030
cargo-util-schemas = "0.8.2"
3131
semver = "1.0.26"
32+
dunce = "1.0.5"
3233

3334
# This crate MUST NEVER be upgraded, we need this particular "first" version to support old rust-gpu builds
3435
legacy_target_specs = { package = "rustc_codegen_spirv-target-specs", version = "0.9.0", features = ["include_str"] }

crates/cargo-gpu/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ serde.workspace = true
2424
serde_json.workspace = true
2525
crossterm.workspace = true
2626
semver.workspace = true
27+
dunce.workspace = true
2728

2829
[dev-dependencies]
2930
test-log.workspace = true

crates/cargo-gpu/src/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ impl Build {
7676
self.build.output_dir.display()
7777
);
7878
std::fs::create_dir_all(&self.build.output_dir)?;
79-
let canonicalized = self.build.output_dir.canonicalize()?;
79+
let canonicalized = dunce::canonicalize(&self.build.output_dir)?;
8080
log::debug!("canonicalized output dir: {}", canonicalized.display());
8181
self.build.output_dir = canonicalized;
8282

8383
// Ensure the shader crate exists
84-
self.install.shader_crate = self.install.shader_crate.canonicalize()?;
84+
self.install.shader_crate = dunce::canonicalize(&self.install.shader_crate)?;
8585
anyhow::ensure!(
8686
self.install.shader_crate.exists(),
8787
"shader crate '{}' does not exist. (Current dir is '{}')",

0 commit comments

Comments
 (0)