From 5918e696b681470ec5202f56ff17b304ac8a958a Mon Sep 17 00:00:00 2001 From: Schell Carl Scivally Date: Sun, 8 Dec 2024 11:09:21 +1300 Subject: [PATCH] permit windows .exe extension when looking for spirv-builder-cli --- crates/cargo-gpu/src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/cargo-gpu/src/main.rs b/crates/cargo-gpu/src/main.rs index a4225d9..4f0a9ad 100644 --- a/crates/cargo-gpu/src/main.rs +++ b/crates/cargo-gpu/src/main.rs @@ -394,7 +394,11 @@ impl Install { panic!("spirv-builder-cli build failed"); } - let cli_path = release.join("spirv-builder-cli"); + let cli_path = if cfg!(target_os = "windows") { + release.join("spirv-builder-cli").with_extension("exe") + } else { + release.join("spirv-builder-cli") + }; if cli_path.is_file() { log::info!("successfully built {}", cli_path.display()); std::fs::rename(&cli_path, &dest_cli_path).unwrap();