summaryrefslogtreecommitdiffstats
path: root/jobqueue.pl
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-03-06 01:31:31 +0100
committerGitHub <noreply@github.com>2018-03-06 01:31:31 +0100
commitf57cde085d95bb0c1a54959b25157af94f776fc9 (patch)
tree500754af5ecbc33a576fc6df63b4042185ce94e9 /jobqueue.pl
parentb98297ba59d43470680c9d3f21994214c63bd005 (diff)
downloadbugzilla-f57cde085d95bb0c1a54959b25157af94f776fc9.tar.gz
bugzilla-f57cde085d95bb0c1a54959b25157af94f776fc9.tar.xz
Bug 1441181 - Step 2 - Fix jobqueue header and @INC
Diffstat (limited to 'jobqueue.pl')
-rwxr-xr-xjobqueue.pl10
1 files changed, 5 insertions, 5 deletions
diff --git a/jobqueue.pl b/jobqueue.pl
index ebc9118e8..011d0ff87 100755
--- a/jobqueue.pl
+++ b/jobqueue.pl
@@ -10,15 +10,15 @@ use 5.10.1;
use strict;
use warnings;
-use Cwd qw(abs_path);
use File::Basename;
+use File::Spec;
BEGIN {
- # Untaint the abs_path.
- my ($a) = abs_path($0) =~ /^(.*)$/;
- chdir dirname($a);
+ require lib;
+ my $dir = File::Spec->rel2abs(dirname(__FILE__));
+ lib->import($dir, File::Spec->catdir($dir, 'lib'), File::Spec->catdir($dir, qw(local lib perl5)));
+ chdir $dir or die "chdir $dir failed: $!";
}
-use lib qw(. lib local/lib/perl5);
use Bugzilla;
use Bugzilla::JobQueue::Runner;