Skip to content

Commit

Permalink
[BUG] Use a full path mktemp to not leave orphans in $DEVENV_ROOT
Browse files Browse the repository at this point in the history
  • Loading branch information
penguincoder committed Aug 31, 2023
1 parent da313ab commit c377acc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/modules/services/postgres.nix
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ let
echo "PostgreSQL is setting up the initial database."
echo
OLDPGHOST="$PGHOST"
PGHOST="$DEVENV_STATE/$(mktemp -d "pg-init-XXXXXX")"
mkdir -p "$PGHOST"
PGHOST=$(mktemp -d "$DEVENV_STATE/pg-init-XXXXXX")
function remove_tmp_pg_init_sock_dir() {
if [[ -d "$1" ]]; then
Expand Down

0 comments on commit c377acc

Please sign in to comment.