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 :(.
This commit is contained in:
Alex David 2025-08-22 16:59:46 -07:00
commit cd825bf411

View file

@ -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
${"''"})