diff --git a/t/loc_tools.pl b/t/loc_tools.pl index e518b820b45d..f7d3455f7269 100644 --- a/t/loc_tools.pl +++ b/t/loc_tools.pl @@ -568,8 +568,10 @@ ($;$) # Other subversive stuff. delete local @ENV{qw(IFS CDPATH ENV BASH_ENV)}; - if (-x "/usr/bin/locale" - && open(LOCALES, '-|', "/usr/bin/locale -a 2>/dev/null")) + my $locale_cmd = "/usr/bin/locale"; + $locale_cmd = "/bin/locale" unless -x $locale_cmd; + if ( -x $locale_cmd + && open(LOCALES, '-|', "$locale_cmd -a 2>/dev/null")) { while () {