summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2008-08-19 06:27:50 +0200
committerlpsolit%gmail.com <>2008-08-19 06:27:50 +0200
commit031d3a6cf6310c7ffe321f9814a83ae2088cc215 (patch)
tree9c93fcd703564d7727a761d1a513c01014c8fb9a
parent82cadd2303b515277cf29a14d156312cddd46926 (diff)
downloadbugzilla-031d3a6cf6310c7ffe321f9814a83ae2088cc215.tar.gz
bugzilla-031d3a6cf6310c7ffe321f9814a83ae2088cc215.tar.xz
Bug 450609: Add OS detection in install-module.pl to make it refuse to run on Windows - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=LpSolit
-rw-r--r--install-module.pl10
1 files changed, 9 insertions, 1 deletions
diff --git a/install-module.pl b/install-module.pl
index a0de6d70a..ca99ac23d 100644
--- a/install-module.pl
+++ b/install-module.pl
@@ -46,6 +46,13 @@ GetOptions(\%switch, 'all|a', 'upgrade-all|u', 'show-config|s', 'global|g',
'help|h');
pod2usage({ -verbose => 1 }) if $switch{'help'};
+
+if (ON_WINDOWS) {
+ print "\nYou cannot run this script on Windows. Please follow instructions\n";
+ print "given by checksetup.pl to install missing Perl modules.\n\n";
+ exit;
+}
+
pod2usage({ -verbose => 0 }) if (!%switch && !@ARGV);
set_cpan_config($switch{'global'});
@@ -98,7 +105,8 @@ __END__
=head1 NAME
-install-module.pl - Installs or upgrades modules from CPAN
+install-module.pl - Installs or upgrades modules from CPAN.
+This script does not run on Windows.
=head1 SYNOPSIS