Commit 9de1dd12 authored by Leo Gordon's avatar Leo Gordon
Browse files

make sure runs from its own scripts directory...

make sure runs from its own scripts directory (ignore the one in the path)
parent ad16dfde
......@@ -2,9 +2,11 @@
use strict;
use warnings;
use Data::Dumper;
use Getopt::Long;
use Cwd 'abs_path'; # both are needed to pick 'our'
use File::Basename 'dirname'; #
use Bio::EnsEMBL::Hive::Utils ('script_usage', 'destringify');
use Bio::EnsEMBL::Hive::Utils::Config;
use Bio::EnsEMBL::Hive::DBSQL::DBAdaptor;
......@@ -273,9 +275,11 @@ sub main {
sub generate_worker_cmd {
my ($self, $run_analysis, $run_job_id, $force) = @_;
my $worker_cmd = '';
unless(`$worker_cmd`) {
print("can't find $worker_cmd script. Please make sure it's in your path\n");
my $beekeeper_fullpath = abs_path($0);
my $worker_cmd = dirname($beekeeper_fullpath).'/';
unless(-x $worker_cmd) {
print("Can't run '$worker_cmd' script for some reason, please investigate.\n");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment