From 9fb6afd6582b9a9ae2a01637f0c33ef6fb3dca20 Mon Sep 17 00:00:00 2001 From: Nicolas Dumazet Date: Sat, 29 Aug 2026 14:02:55 +0200 Subject: [PATCH] fix(zig_toolchain): avoid depending on coreutils touch in version validation The version-validation action's shell script ran unqualified and with no declared env/PATH, so it inherits an empty action environment. On systems without an FHS-style /bin:/usr/bin (e.g. NixOS), bash's compiled-in fallback PATH doesn't resolve 'touch', and the action fails with 'touch: command not found' even though bash itself was found via an explicit toolchain path. Replace touch with printf, a bash builtin. --- zig/private/zig_toolchain.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zig/private/zig_toolchain.bzl b/zig/private/zig_toolchain.bzl index 8ed8c46b..3d551058 100644 --- a/zig/private/zig_toolchain.bzl +++ b/zig/private/zig_toolchain.bzl @@ -125,7 +125,7 @@ def _validate_zig_version(ctx, *, zig_exe, tools, zig_version): ' echo "Zig SDK version mismatch. Expected \'$2\' but got \'$actual_version\'." >&2', " exit 1", "fi", - 'touch "$3"', + 'printf \'\' > "$3"', ]), mnemonic = "ZigVersionValidation", progress_message = "validate Zig SDK version for toolchain %{label}",