mirror of
https://github.com/apache/druid.git
synced 2025-02-17 07:25:02 +00:00
Make java version check work on all shells (#9376)
* Make java version check work on all shells Previously, "perl verify-java" would fail on shells like zsh, which would cause the quickstart scripts (e.g., bin/start-micro-quickstart) to fail unless the DRUID_SKIP_JAVA_SKIP environment variable is set. * Support dash (ubuntu)
This commit is contained in:
parent
b408a6d774
commit
26eeba636a
@ -33,7 +33,7 @@ get_java_bin_dir() {
|
||||
elif [ ! -z "$(command -v java)" ]; then
|
||||
# Strip /java from the location of where java is installed
|
||||
JAVA_ON_PATH="$(command -v java)"
|
||||
echo -n "${JAVA_ON_PATH%/java}"
|
||||
printf "${JAVA_ON_PATH%/java}"
|
||||
else
|
||||
printf ""
|
||||
fi
|
||||
|
@ -52,7 +52,7 @@ if ($skip_var && $skip_var ne "0" && $skip_var ne "false" && $skip_var ne "f") {
|
||||
}
|
||||
|
||||
my $cwd = dirname(__FILE__);
|
||||
my $java_bin_dir = `source $cwd/java-util && get_java_bin_dir 2>&1`;
|
||||
my $java_bin_dir = `. $cwd/java-util && get_java_bin_dir 2>&1`;
|
||||
|
||||
# If we could not find java
|
||||
if ($java_bin_dir eq "") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user