This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
(perl #133951) don't write an invalid lib/buildcustomize.pl
[perl5.git] / write_buildcustomize.pl
index e82f931..862b09f 100644 (file)
@@ -61,6 +61,9 @@ require Cwd;
 
 my $cwd  = Cwd::getcwd();
 
+defined $cwd
+  or die "$0: Can't determine current working directory\n";
+
 # lib must be last, as the toolchain modules write themselves into it
 # as they build, and it's important that @INC order ensures that the partially
 # written files are always masked by the complete versions.