tests: git: Don't read from the users global Git config file.
* guix/tests/git (populate-git-repository): Set the GIT_CONFIG_GLOBAL environment variable to the temporary Git config file. Signed-off-by: Ludovic Courtès <ludo@gnu.org>master
parent
358ad74f41
commit
4674738cdb
|
@ -1,5 +1,6 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -53,6 +54,7 @@ Return DIRECTORY on success."
|
|||
(with-environment-variables
|
||||
`(("GIT_CONFIG_NOSYSTEM" "1")
|
||||
("GIT_ATTR_NOSYSTEM" "1")
|
||||
("GIT_CONFIG_GLOBAL" ,(string-append home "/.gitconfig"))
|
||||
("HOME" ,home))
|
||||
(apply invoke (git-command) "-C" directory
|
||||
command args)))))
|
||||
|
|
Reference in New Issue