From a40068e04254d14c5215d80e010f00d842e60b06 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Fri, 1 May 2026 16:12:11 +0200 Subject: [PATCH] writeTextFile: use printf instead of echo This is safer in the case of large strings since it doesn't trigger "Argument list too long" errors. --- pkgs/build-support/trivial-builders/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/trivial-builders/default.nix b/pkgs/build-support/trivial-builders/default.nix index 10ad4ab187e3..04e284ca9652 100644 --- a/pkgs/build-support/trivial-builders/default.nix +++ b/pkgs/build-support/trivial-builders/default.nix @@ -146,7 +146,7 @@ rec { if [ -e "$textPath" ]; then mv "$textPath" "$target" else - echo -n "$text" > "$target" + printf "%s" "$text" > "$target" fi if [ -n "$executable" ]; then