From f57cde085d95bb0c1a54959b25157af94f776fc9 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Mon, 5 Mar 2018 19:31:31 -0500 Subject: Bug 1441181 - Step 2 - Fix jobqueue header and @INC --- jobqueue.pl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'jobqueue.pl') 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; -- cgit v1.2.3-24-g4f1b