From 802cce9a287e114ae20147fd03ffcd63a7e72422 Mon Sep 17 00:00:00 2001 From: Taimoor Zaeem Date: Tue, 25 Nov 2025 20:54:25 +0500 Subject: [PATCH] nix(shell): remove `postgrest/` directory prefix when running pg (#4502) When running postgres from nix-shell, nix creates a directory structure like `postgrest/postgrest-with-pg-17-XXX` in the `/tmp` directory. This commit removes the extra `postgrest/` prefix to shorten length of absolute path length of filenames. Signed-off-by: Taimoor Zaeem --- nix/overlays/checked-shell-script/checked-shell-script.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nix/overlays/checked-shell-script/checked-shell-script.nix b/nix/overlays/checked-shell-script/checked-shell-script.nix index df6f03d49..d541b59ae 100644 --- a/nix/overlays/checked-shell-script/checked-shell-script.nix +++ b/nix/overlays/checked-shell-script/checked-shell-script.nix @@ -104,8 +104,7 @@ let '' + lib.optionalString withTmpDir '' - mkdir -p "''${TMPDIR:-/tmp}/postgrest" - tmpdir="$(${coreutils}/bin/mktemp -d --tmpdir postgrest/${name}-XXX)" + tmpdir="$(${coreutils}/bin/mktemp -d --tmpdir ${name}-XXX)" # we keep the tmpdir when an error occurs for debugging trap 'echo Temporary directory kept at: $tmpdir' ERR