From 559609ae3e21ee6f64f48285b4ff5ed9f2b75a4c Mon Sep 17 00:00:00 2001 From: Masato TOYOSHIMA <77603626+phoepsilonix@users.noreply.github.com> Date: Sun, 12 Jan 2025 15:35:29 +0900 Subject: [PATCH] Adjusted zig cc judgment and avoided zigbuild errors(#1360) (#1361) * Adjusted zig cc judgment and avoided zigbuild errors(#1360) Adjusted is_zig_cc judgment and adjusted how supports_path_delimiter is handled. * Update src/lib.rs Co-authored-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * typo fix and format check cargo fmt --check * Revert "Update src/lib.rs" This reverts commit a69d8bbd51417941cd92df68fb62ead8c213d1a9. --------- Co-authored-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --- src/tool.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tool.rs b/src/tool.rs index bfd2d177..4233d591 100644 --- a/src/tool.rs +++ b/src/tool.rs @@ -103,6 +103,12 @@ impl Tool { ) .map(|o| String::from_utf8_lossy(&o).contains("ziglang")) .unwrap_or_default() + || { + match path.file_name().map(OsStr::to_string_lossy) { + Some(fname) => fname.contains("zig"), + _ => false, + } + } } fn guess_family_from_stdout(