diff options
author | Tony Cook <tony@develop-help.com> | 2019-03-25 16:11:16 +1100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2019-04-15 09:26:29 +1000 |
commit | 05fed879afada2f6ac1f1b5b6962e06190f5b9f6 (patch) | |
tree | 86b36cda5eaee68ec44d6909d8b44f3ac05a614b /write_buildcustomize.pl | |
parent | 918fbd43ad287e3a4b8f309a55f91e409747c895 (diff) | |
download | perl-05fed879afada2f6ac1f1b5b6962e06190f5b9f6.tar.gz |
(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.
Diffstat (limited to 'write_buildcustomize.pl')
-rw-r--r-- | write_buildcustomize.pl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/write_buildcustomize.pl b/write_buildcustomize.pl index e82f931bae..862b09fab8 100644 --- a/write_buildcustomize.pl +++ b/write_buildcustomize.pl @@ -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. |