diff --git a/nix/mariadb-up-mac.nix b/nix/mariadb-up-mac.nix --- a/nix/mariadb-up-mac.nix +++ b/nix/mariadb-up-mac.nix @@ -17,6 +17,10 @@ echo "View MariaDB logs: tail -f $MARIADB_DIR/logs" >&2 echo "Kill MariaDB server: pkill mariadbd" >&2 + # Explicitly close fd3 to prevent `direnv` from hanging + # (https://linear.app/comm/issue/ENG-3254/remove-wait-logic-in-nix-develop) + exec 3>&- + exec "${mariadb}/bin/mariadbd" \ --socket "$MARIADB_DIR"/mysql.sock \ --datadir "$MARIADB_DIR" \ diff --git a/nix/redis-up-mac.nix b/nix/redis-up-mac.nix --- a/nix/redis-up-mac.nix +++ b/nix/redis-up-mac.nix @@ -15,7 +15,11 @@ echo "View Redis Logs: tail -f $REDIS_CACHE_DIR/logs" >&2 echo "Kill Redis server: pkill redis" >&2 - # 'exec' allows for us to replace bash process with MariaDB + # Explicitly close fd3 to prevent `direnv` from hanging + # (https://linear.app/comm/issue/ENG-3254/remove-wait-logic-in-nix-develop) + exec 3>&- + + # 'exec' allows for us to replace bash process with Redis exec ${redis}/bin/redis-server \ &> "$REDIS_CACHE_DIR"/logs '';