mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 09:49:23 +02:00
GP-3542 Don't try to prompt user for JDK path when no tty present
This commit is contained in:
parent
176bdea28a
commit
c93024e367
1 changed files with 7 additions and 0 deletions
|
@ -135,6 +135,13 @@ fi
|
||||||
# Get the JDK that will be used to launch Ghidra
|
# Get the JDK that will be used to launch Ghidra
|
||||||
JAVA_HOME="$(java -cp "${LS_CPATH}" LaunchSupport "${INSTALL_DIR}" ${JAVA_TYPE_ARG} -save)"
|
JAVA_HOME="$(java -cp "${LS_CPATH}" LaunchSupport "${INSTALL_DIR}" ${JAVA_TYPE_ARG} -save)"
|
||||||
if [ ! $? -eq 0 ]; then
|
if [ ! $? -eq 0 ]; then
|
||||||
|
# If fd 0 (stdin) isn't a tty, fail because we can't prompt the user
|
||||||
|
if [ ! -t 0 ]; then
|
||||||
|
echo
|
||||||
|
echo "Unable to prompt user for JDK path, no TTY detected. Please refer to the Ghidra Installation Guide's Troubleshooting section."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# No JDK has been setup yet. Let the user choose one.
|
# No JDK has been setup yet. Let the user choose one.
|
||||||
java -cp "${LS_CPATH}" LaunchSupport "${INSTALL_DIR}" ${JAVA_TYPE_ARG} -ask
|
java -cp "${LS_CPATH}" LaunchSupport "${INSTALL_DIR}" ${JAVA_TYPE_ARG} -ask
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue