[ https://issues.apache.org/jira/browse/KNOX-3153?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tamás Marcinkovics updated KNOX-3153: ------------------------------------- Description: In knoxcli.sh, java 17 version is not detected correctly if the java command is not in the PATH. [https://github.com/apache/knox/blob/dfcde4df9638397e2387d983c387f003e34bd721/gateway-release/home/bin/knoxcli.sh#L66] As the script uses the JAVA variable for launch, the version command should also use the same. Also, the variable should be quoted so that paths with spaces would work as well. (The gateway launch command uses quotes, knoxcli.sh should also do the same: [https://github.com/apache/knox/blob/dfcde4df9638397e2387d983c387f003e34bd721/gateway-release-common/home/bin/knox-functions.sh#L287)] was: In knoxcli.sh, java 17 version is not detected correctly if the java command is not in the PATH. [https://github.com/apache/knox/blob/dfcde4df9638397e2387d983c387f003e34bd721/gateway-release/home/bin/knoxcli.sh#L66] As the script uses the JAVA variable for launch, the version command should also use the same. Also, the variable should be quoted so that paths with spaces would work as well. > Fix Java command invocations in knoxcli.sh > ------------------------------------------ > > Key: KNOX-3153 > URL: https://issues.apache.org/jira/browse/KNOX-3153 > Project: Apache Knox > Issue Type: Task > Components: KnoxCLI > Affects Versions: 2.1.0 > Reporter: Tamás Marcinkovics > Assignee: Tamás Marcinkovics > Priority: Major > Labels: easyfix > Fix For: 2.1.0 > > Time Spent: 10m > Remaining Estimate: 0h > > In knoxcli.sh, java 17 version is not detected correctly if the java command > is not in the PATH. > [https://github.com/apache/knox/blob/dfcde4df9638397e2387d983c387f003e34bd721/gateway-release/home/bin/knoxcli.sh#L66] > As the script uses the JAVA variable for launch, the version command should > also use the same. > Also, the variable should be quoted so that paths with spaces would work as > well. > (The gateway launch command uses quotes, knoxcli.sh should also do the same: > [https://github.com/apache/knox/blob/dfcde4df9638397e2387d983c387f003e34bd721/gateway-release-common/home/bin/knox-functions.sh#L287)] > -- This message was sent by Atlassian Jira (v8.20.10#820010)