Skip to content

Commit

Permalink
Merge pull request #796 from douglasgscofield/master
Browse files Browse the repository at this point in the history
within set_JAVA_PATH, generalize check for java version and prevent substitutions within awk command
  • Loading branch information
KatharinaHoff authored May 10, 2024
2 parents b8cd99e + bcb54fb commit 3f1f9b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/braker.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2341,7 +2341,7 @@ sub set_JAVA_PATH {
$JAVA_PATH = set_software_PATH($java_path, "JAVA_PATH",
\@required_files, 'exit');

$cmdString = "java -version 2>&1 | grep 'openjdk version' | awk -F['\"''.'] -v OFS=. '{print $2,$3}'";
$cmdString = "java -version 2>&1 | grep 'version' | awk -F['\"''.'] -v OFS=. ".'\'{print $2,$3}\'';
my @javav = `$cmdString` or die("Failed to execute: $cmdString");
if(not ($javav[0] =~ m/1\.8/ )){
$prtStr = "\# " . (localtime) . " ERROR: in file " . __FILE__
Expand Down

0 comments on commit 3f1f9b4

Please sign in to comment.