This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Silence Cwd.pm warning on Android builds if targetsh is not defined
authorRichard Leach <rich+perl@hyphen-dash-hyphen.info>
Tue, 16 Apr 2019 20:07:00 +0000 (20:07 +0000)
committerKarl Williamson <khw@cpan.org>
Fri, 19 Apr 2019 18:06:33 +0000 (12:06 -0600)
dist/PathTools/Cwd.pm

index ec3ad5a..9b173c2 100644 (file)
@@ -171,7 +171,7 @@ if($^O ne 'MSWin32') {
 if ($^O =~ /android/) {
     # If targetsh is executable, then we're either a full
     # perl, or a miniperl for a native build.
-    if (-x $Config::Config{targetsh}) {
+    if ( exists($Config::Config{targetsh}) && -x $Config::Config{targetsh}) {
         $pwd_cmd = "$Config::Config{targetsh} -c pwd"
     }
     else {