format: Set {,XDG_CONFIG_}HOME to empty dir rather than empty string

As empty string might get interpreted as `/`, and thus probably has
things in it. This dir is always(?) present on *nix systems, empty, and
owned by root, so ideal and typical for this sort of usage.
This commit is contained in:
Andrew Marshall 2025-04-24 13:47:46 -04:00 committed by Austin Horstman
parent abfad3d295
commit dedfde15f6

4
format
View file

@ -2,8 +2,8 @@
#! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/42a1c966be226125b48c384171c44c651c236c22.tar.gz -i bash -p git gnugrep gnused findutils nixfmt-tree
# Avoid being affected by system and user git config.
export GIT_CONFIG_NOSYSTEM=1
export HOME=
export XDG_CONFIG_HOME=
export HOME=/var/empty
export XDG_CONFIG_HOME=/var/empty
nixfmt_args=()
files=()