Skip to content

Commit 7b90363

Browse files
committed
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 <[email protected]>
1 parent 086cb91 commit 7b90363

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

t/lib-gettext.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@ export GIT_TEXTDOMAINDIR GIT_PO_PATH
1414
if test_have_prereq GETTEXT && ! test_have_prereq GETTEXT_POISON
1515
then
1616
# 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$/{
1819
p
1920
q
2021
}')
2122
# 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$/{
2325
p
2426
q
2527
}')

0 commit comments

Comments
 (0)