Skip to content

Commit 31f101e

Browse files
committed
fix(windows): correct wit-bindgen stripPrefix for Windows zip archives
The stripPrefix was not removing .zip extension for Windows archives, causing extraction errors on Windows CI: Error: Prefix "wit-bindgen-0.46.0-x86_64-windows.zip" not found Should be: "wit-bindgen-0.46.0-x86_64-windows" This fix adds .replace(".zip", "") alongside .replace(".tar.gz", "") to handle both Unix (.tar.gz) and Windows (.zip) archive formats correctly.
1 parent 7120ba3 commit 31f101e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

toolchains/wasm_toolchain.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ def _download_wit_bindgen(repository_ctx):
535535
repository_ctx.download_and_extract(
536536
url = wit_bindgen_url,
537537
sha256 = tool_info["sha256"],
538-
stripPrefix = "wit-bindgen-{}-{}".format(wit_bindgen_version, tool_info["url_suffix"].replace(".tar.gz", "")),
538+
stripPrefix = "wit-bindgen-{}-{}".format(wit_bindgen_version, tool_info["url_suffix"].replace(".tar.gz", "").replace(".zip", "")),
539539
)
540540

541541
def _download_wrpc(repository_ctx):

0 commit comments

Comments
 (0)