From 1e2a9d2d29216f3512e6a02905b4f88f11bf5d0e Mon Sep 17 00:00:00 2001 From: Terje Larsen Date: Fri, 3 Jan 2025 11:22:01 +0100 Subject: [PATCH] format: ignore system and user git config This can cause failures if the user has configuration that is incompatible with the version of git pinned in the format script. Potentially it could have other undesired effects as well. Fix #5736 --- format | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/format b/format index 4f46c7b9..2eb16d9a 100755 --- a/format +++ b/format @@ -1,6 +1,11 @@ #! /usr/bin/env nix-shell #! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/6616de389ed55fba6eeba60377fc04732d5a207c.tar.gz -i bash -p git gnugrep gnused findutils nixfmt +# Avoid being affected by system and user git config. +export GIT_CONFIG_NOSYSTEM=1 +export HOME= +export XDG_CONFIG_HOME= + nixfmt_args=() files=()