Skip to content

Commit

Permalink
bugfix: the treatment of ARGV was wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
muffato committed Dec 15, 2016
1 parent 2cb3a90 commit b3bc9a7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions scripts/standaloneJob.pl
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,19 @@ sub main {
warn "Will now disconnect from it. Be aware that the original job will NOT be updated with the outcome of this standalone. Use runWorker.pl if you want to register your run.\n";

} elsif (!$input_id) {
$module_or_file = shift @ARGV;
my ($param_hash, $param_list) = parse_cmdline_options();
if (@$param_list) {
die "ERROR: There are invalid arguments on the command-line: ". join(" ", @$param_list). "\n";
}
$input_id = stringify($param_hash);
} elsif (@ARGV) {
die "ERROR: There are invalid arguments on the command-line: ". join(" ", @ARGV). "\n";
} else {
$module_or_file = shift @ARGV;
if (@ARGV) {
die "ERROR: There are invalid arguments on the command-line: ". join(" ", @ARGV). "\n";
}
}

$module_or_file ||= shift @ARGV;

if (!$module_or_file) {
script_usage(1);
}
Expand Down

0 comments on commit b3bc9a7

Please sign in to comment.