Skip to content

Commit

Permalink
Refuse to allow relative paths for java and gnuplot. Issue #962.
Browse files Browse the repository at this point in the history
  • Loading branch information
brianwalenz committed Jun 19, 2018
1 parent 6867945 commit 49267eb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/pipelines/canu/Defaults.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,10 @@ sub checkJava () {
my $version = 0;
my @javaVersionStrings;

if ($java =~ m/^\./) {
addCommandLineError("ERROR: path to java '$java' must not be a relative path.\n");
}

# We've seen errors running just this tiny java if too many copies are ran at the same time.
# So, run it twice, if needed, with a little random delay between.

Expand Down Expand Up @@ -1065,6 +1069,10 @@ sub checkGnuplot () {
my $format = getGlobal("gnuplotImageFormat");
my $version = undef;

if ($gnuplot =~ m/^\./) {
addCommandLineError("ERROR: path to gnuplot '$gnuplot' must not be a relative path.\n")
}

# Check for existence of gnuplot.

open(F, "$gnuplot -V |");
Expand Down

0 comments on commit 49267eb

Please sign in to comment.