From 762fdbdef52b4c17df578478cadc8655d56171a4 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 5 Oct 2023 14:37:13 +0200 Subject: perform-download: Set PATH before invoking ‘git’. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes . Reported by Guillaume Le Vaillant . * guix/scripts/perform-download.scm (perform-git-download): Add call to ‘setenv’. --- guix/scripts/perform-download.scm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/guix/scripts/perform-download.scm b/guix/scripts/perform-download.scm index 045dd84ad6..9aa0e61e9d 100644 --- a/guix/scripts/perform-download.scm +++ b/guix/scripts/perform-download.scm @@ -108,6 +108,12 @@ Note: OUTPUT may differ from the 'out' value of DRV, notably for 'bmCheck' or (drv-output (assoc-ref (derivation-outputs drv) "out")) (algo (derivation-output-hash-algo drv-output)) (hash (derivation-output-hash drv-output))) + ;; Commands such as 'git submodule' expect Coreutils and sed (among + ;; others) to be in $PATH. The 'git' package in Guix should address it + ;; with wrappers but packages on other distros such as Debian may rely + ;; on ambient authority, hence the PATH value below. + (setenv "PATH" "/run/current-system/profile/bin:/bin:/usr/bin") + (git-fetch-with-fallback url commit output #:recursive? recursive? #:git-command %git)))) -- cgit v1.2.3