]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 607083: Improve the error message that install-module.pl prints when
authorMax Kanat-Alexander <mkanat@bugzilla.org>
Tue, 26 Oct 2010 21:07:30 +0000 (14:07 -0700)
committerMax Kanat-Alexander <mkanat@bugzilla.org>
Tue, 26 Oct 2010 21:07:30 +0000 (14:07 -0700)
you specify an invalid CPAN module.
r=mkanat, a=mkanat (module owner)

Bugzilla/Install/CPAN.pm
template/en/default/setup/strings.txt.pl

index 0ef003d69c82897a9ce32c337581a74d3a8039cd..20cdb5bbd55f8f72db1215815fad143ba4495e70 100644 (file)
@@ -147,6 +147,9 @@ sub install_module {
     }
 
     my $module = CPAN::Shell->expand('Module', $name);
+    if (!$module) {
+        die install_string('no_such_module', { module => $name }) . "\n";
+    }
     print install_string('install_module', 
               { module => $name, version => $module->cpan_version }) . "\n";
     if ($test) {
index 889bb12b261f917022730fe42c0fd22ece2bd350..c786ef36b21a2fb0eba1e0e79b3efc6f3290a2a5 100644 (file)
@@ -311,6 +311,7 @@ EOT
     module_not_found => "not found",
     module_ok => 'ok',
     module_unknown_version => "found unknown version",
+    no_such_module => "There is no Perl module on CPAN named ##module##.",
     mysql_innodb_disabled => <<'END',
 InnoDB is disabled in your MySQL installation.
 Bugzilla requires InnoDB to be enabled.