diff options
author | Mathieu Othacehe <m.othacehe@gmail.com> | 2020-04-10 15:44:38 +0200 |
---|---|---|
committer | Mathieu Othacehe <m.othacehe@gmail.com> | 2020-04-10 15:50:44 +0200 |
commit | 1a24df44347629cd67821d672edad7636404f293 (patch) | |
tree | 2b55b3f2cb46a98affe064015efed57903d85a27 | |
parent | 93299e61273a6bc7e15b3ca7b6f88f15f93a8f95 (diff) | |
download | guix-1a24df44347629cd67821d672edad7636404f293.tar.gz guix-1a24df44347629cd67821d672edad7636404f293.zip |
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.scm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gnu/installer/utils.scm b/gnu/installer/utils.scm index 0a91ae1e4a..5f8fe8ca01 100644 --- a/gnu/installer/utils.scm +++ b/gnu/installer/utils.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com> +;;; Copyright © 2018, 2020 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. @@ -93,7 +93,8 @@ COMMAND exited successfully, #f otherwise." (setenv "LC_ALL" locale) (setenv "LANGUAGE" (string-take locale - (string-index locale #\_)))))) + (or (string-index locale #\_) + (string-length locale))))))) (guard (c ((invoke-error? c) (newline) |