From: Dylan William Hardison Date: Tue, 6 Mar 2018 00:31:31 +0000 (-0500) Subject: Bug 1441181 - Step 2 - Fix jobqueue header and @INC X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f57cde085d95bb0c1a54959b25157af94f776fc9;p=thirdparty%2Fbugzilla.git Bug 1441181 - Step 2 - Fix jobqueue header and @INC --- 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;