summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Othacehe <m.othacehe@gmail.com>2020-04-10 15:44:38 +0200
committerLudovic Courtès <ludo@gnu.org>2020-04-10 16:05:38 +0200
commit0bd7a6bad9af06e1149e7019a3102edbbeac6b76 (patch)
treeee52adfddc426abb1d5a9b69f92989fc0ca55c96
parent2281a77a3ca9b30308b16e79295ac6e3001879f8 (diff)
gnu: installer: Fix issue with "Esperanto" locale.
According to glibc manual, locale are under the following form: language[_territory[.codeset]][@modifier] The esperanto locale "epo" does not have a territory. Modify run-command to take this into account. Reported by Alex Sassmannshausen here: https://lists.gnu.org/archive/html/guix-devel/2020-04/msg00192.html. * gnu/installer/utils.scm (run-command): Handle locale without territory such as "epo".
-rw-r--r--gnu/installer/utils.scm5
1 files changed, 3 insertions, 2 deletions
diff --git a/gnu/installer/utils.scm b/gnu/installer/utils.scm
index 0a91ae1e4a3..5f8fe8ca019 100644
--- a/gnu/installer/utils.scm
+++ b/gnu/installer/utils.scm
@@ -1,5 +1,5 @@
1;;; GNU Guix --- Functional package management for GNU 1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com> 2;;; Copyright © 2018, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
3;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org> 3;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
4;;; 4;;;
5;;; This file is part of GNU Guix. 5;;; This file is part of GNU Guix.
@@ -93,7 +93,8 @@ COMMAND exited successfully, #f otherwise."
93 (setenv "LC_ALL" locale) 93 (setenv "LC_ALL" locale)
94 (setenv "LANGUAGE" 94 (setenv "LANGUAGE"
95 (string-take locale 95 (string-take locale
96 (string-index locale #\_)))))) 96 (or (string-index locale #\_)
97 (string-length locale)))))))
97 98
98 (guard (c ((invoke-error? c) 99 (guard (c ((invoke-error? c)
99 (newline) 100 (newline)