summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install/Util.pm
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2011-04-25 02:11:03 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2011-04-25 02:11:03 +0200
commitcabe538139ecdbc82ab2eb1e06fcf6f95f1dac5f (patch)
treea5ae2dff4ca9ae863cd156f036a6c89bdffa80a2 /Bugzilla/Install/Util.pm
parentf0129cf8687a0f926be28b615d51230d641f8982 (diff)
downloadbugzilla-cabe538139ecdbc82ab2eb1e06fcf6f95f1dac5f.tar.gz
bugzilla-cabe538139ecdbc82ab2eb1e06fcf6f95f1dac5f.tar.xz
Bug 648178: Make install-module.pl check if a compiler is available
and fail with a clear error if not. r=glob, a=mkanat
Diffstat (limited to 'Bugzilla/Install/Util.pm')
-rw-r--r--Bugzilla/Install/Util.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/Bugzilla/Install/Util.pm b/Bugzilla/Install/Util.pm
index a2371a0be..bd8942507 100644
--- a/Bugzilla/Install/Util.pm
+++ b/Bugzilla/Install/Util.pm
@@ -58,8 +58,14 @@ our @EXPORT_OK = qw(
sub bin_loc {
my ($bin, $path) = @_;
+
+ # If the binary is a full path...
+ if ($bin =~ m{[/\\]}) {
+ return MM->maybe_command($bin) || '';
+ }
+
+ # Otherwise we look for it in the path in a cross-platform way.
my @path = $path ? @$path : File::Spec->path;
-
foreach my $dir (@path) {
next if !-d $dir;
my $full_path = File::Spec->catfile($dir, $bin);