Skip to content

Commit da43c74

Browse files
committed
loc_tools: Look also for locale(1) in /bin
That's where it is on z/OS
1 parent a6773db commit da43c74

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

t/loc_tools.pl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,8 +568,10 @@ ($;$)
568568
# Other subversive stuff.
569569
delete local @ENV{qw(IFS CDPATH ENV BASH_ENV)};
570570

571-
if (-x "/usr/bin/locale"
572-
&& open(LOCALES, '-|', "/usr/bin/locale -a 2>/dev/null"))
571+
my $locale_cmd = "/usr/bin/locale";
572+
$locale_cmd = "/bin/locale" unless -x $locale_cmd;
573+
if ( -x $locale_cmd
574+
&& open(LOCALES, '-|', "$locale_cmd -a 2>/dev/null"))
573575
{
574576
while (<LOCALES>) {
575577

0 commit comments

Comments
 (0)