Skip to content

Commit 716fbb2

Browse files
committed
[OPENJDK-312] use "type -p" instead of "which"
run-java.sh called "which" in some circumstances but does not explicitly depend upon it. Severin points out "type -p" can be used instead and is a bash built-in. https://issues.redhat.com/browse/OPENJDK-309 Signed-off-by: Jonathan Dowland <[email protected]>
1 parent ebe2c78 commit 716fbb2

File tree

1 file changed

+1
-1
lines changed
  • modules/run/bash/artifacts/opt/jboss/container/java/run

1 file changed

+1
-1
lines changed

modules/run/bash/artifacts/opt/jboss/container/java/run/run-java.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ run_java_options() {
118118
if [ -f "/opt/run-java-options" ]; then
119119
echo `sh /opt/run-java-options`
120120
else
121-
which run-java-options >/dev/null 2>&1
121+
type -p run-java-options >/dev/null 2>&1
122122
if [ $? = 0 ]; then
123123
echo `run-java-options`
124124
fi

0 commit comments

Comments
 (0)