Commit 8ff02d6a authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 1163248: checksetup.pl is unable to run if File::Slurp is missing

r=dkl a=glob
parent ccda2ce4
......@@ -18,13 +18,14 @@ use strict;
use warnings;
use Bugzilla::Constants;
use Bugzilla::Install::Util qw(install_string bin_loc
use Bugzilla::Install::Util qw(install_string bin_loc success
extension_requirement_packages);
use File::Slurp;
use List::Util qw(max);
use Term::ANSIColor;
use parent qw(Exporter);
use autodie;
our @EXPORT = qw(
REQUIRED_MODULES
OPTIONAL_MODULES
......@@ -907,7 +908,11 @@ sub export_cpanfile {
}
# Write out the cpanfile to the document root
write_file(bz_locations()->{'libpath'} . '/cpanfile', \$cpanfile);
my $file = bz_locations()->{'libpath'} . '/cpanfile';
open(my $fh, '>', $file);
print $fh $cpanfile;
close $fh;
success(install_string('cpanfile_created', { file => $file }));
}
1;
......
......@@ -62,6 +62,7 @@ EOT
Re-run checksetup.pl in interactive mode (without an 'answers' file)
to continue.
END
cpanfile_created => "##file## created",
cpan_bugzilla_home =>
"WARNING: Using the Bugzilla directory as the CPAN home.",
db_enum_setup => "Setting up choices for standard drop-down fields:",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment