From dedfde15f6ad102596d0a3110f9f2852063cbc35 Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Thu, 24 Apr 2025 13:47:46 -0400 Subject: [PATCH] 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. --- format | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/format b/format index b4b9e1d0..64ba7c56 100755 --- a/format +++ b/format @@ -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=()