diff options
author | Noé Lopez <[email protected]> | 2024-12-19 01:15:05 +0100 |
---|---|---|
committer | Ludovic Courtès <[email protected]> | 2024-12-30 13:49:57 +0100 |
commit | 3ea95d7736be1f807d578d17c174b0976543b333 (patch) | |
tree | 65aac94cdf769d62927cb6a29f40d4783220aebe | |
parent | a775968063787d9ca3368a1f24ebdbde4463cfd3 (diff) |
pack: Fix type error in ‘assert-utf8-locale’.
getenv returns #f if the environment variable does not exist, causing a type
error since string=? expects a string.
* guix/build/pack.scm (assert-utf8-locale): Handle unset environment variable.
Change-Id: Idbe7a33a4c8453b8f4ffe6245c32c1373020fb06
Signed-off-by: Ludovic Courtès <[email protected]>
-rw-r--r-- | guix/build/pack.scm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/guix/build/pack.scm b/guix/build/pack.scm index fcb1da2a6c..1b28101469 100644 --- a/guix/build/pack.scm +++ b/guix/build/pack.scm @@ -72,7 +72,7 @@ the `-I' option." (define (assert-utf8-locale) "Verify the current process is using the en_US.utf8 locale." - (unless (string=? "unset for tests" (getenv "GUIX_LOCPATH")) + (unless (string=? "unset for tests" (or (getenv "GUIX_LOCPATH") "")) (unless (false-if-exception (setlocale LC_ALL "en_US.utf8")) (error "environment not configured for en_US.utf8 locale")))) |