t0200: "locale" may not exist
On systems without "locale" installed, t0200-gettext-basic.sh leaked error messages when checking if some test locales are available. Hide them, as they are not very useful. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Dec 18, 2012 at 22:44 UTC
7b90363099e55835885052e7c0512d2af7fdc035
1 file changed
+4
-2
t/lib-gettext.sh
+4
-2
@@ -14,12 +14,14 @@ export GIT_TEXTDOMAINDIR GIT_PO_PATH
14
if test_have_prereq GETTEXT && ! test_have_prereq GETTEXT_POISON
15
then
16
# is_IS.UTF-8 on Solaris and FreeBSD, is_IS.utf8 on Debian
17
- is_IS_locale=$(locale -a | sed -n '/^is_IS\.[uU][tT][fF]-*8$/{
17
+ is_IS_locale=$(locale -a 2>/dev/null |
18
+ sed -n '/^is_IS\.[uU][tT][fF]-*8$/{
19
p
20
q
21
}')
22
# is_IS.ISO8859-1 on Solaris and FreeBSD, is_IS.iso88591 on Debian
22
- is_IS_iso_locale=$(locale -a | sed -n '/^is_IS\.[iI][sS][oO]8859-*1$/{
23
+ is_IS_iso_locale=$(locale -a 2>/dev/null |
24
+ sed -n '/^is_IS\.[iI][sS][oO]8859-*1$/{
25
p
26
q
27
}')