From cd825bf411f1abed02194bc9f388dc327d9b5123 Mon Sep 17 00:00:00 2001 From: Alex David Date: Fri, 22 Aug 2025 16:59:46 -0700 Subject: [PATCH] Fix missing `''` in add-cleanup docs This one is a bit confusing since these docs document a nix multi-line string within a multi-line string, *and* there is a bash interpolation within. We want the docs to render as `if [ -e "''${TMPFILE-}" ]`, since the docs are within a multi-line string. Sorry in advance for anyone attempting to parse this in the nix source code instead of the docs website :(. --- lib/combinators.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/combinators.nix b/lib/combinators.nix index cb408b0..256f1ea 100644 --- a/lib/combinators.nix +++ b/lib/combinators.nix @@ -218,7 +218,7 @@ in rec { do-something "$TMP_FILE" ${"''"}) (add-cleanup ${"''"} - if [ -e "''${TMP_FILE-}" ]; then + if [ -e "${"''"}''${TMP_FILE-}" ]; then rm "$TMP_FILE" fi ${"''"})