Skip to content

Commit 802cce9

Browse files
authored
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 <[email protected]>
1 parent ee334cb commit 802cce9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

nix/overlays/checked-shell-script/checked-shell-script.nix

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ let
104104
''
105105

106106
+ lib.optionalString withTmpDir ''
107-
mkdir -p "''${TMPDIR:-/tmp}/postgrest"
108-
tmpdir="$(${coreutils}/bin/mktemp -d --tmpdir postgrest/${name}-XXX)"
107+
tmpdir="$(${coreutils}/bin/mktemp -d --tmpdir ${name}-XXX)"
109108
110109
# we keep the tmpdir when an error occurs for debugging
111110
trap 'echo Temporary directory kept at: $tmpdir' ERR

0 commit comments

Comments
 (0)