From 05fed879afada2f6ac1f1b5b6962e06190f5b9f6 Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Mon, 25 Mar 2019 16:11:16 +1100 Subject: [PATCH] (perl #133951) don't write an invalid lib/buildcustomize.pl Cwd under miniperl (at this point) can't determine the current directory if some ancestor directory isn't readable. So Cwd::getcwd() would return undef, and write_buildcustomize.pl would write out a list of paths relative to / rather than to the cwd. --- write_buildcustomize.pl +++ write_buildcustomize.pl @@ -61,6 +61,9 @@ 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.