From 5afa32200bf6b158e7caaaca5c94a5515ff7948c Mon Sep 17 00:00:00 2001 From: "Vladimir.Orlov" Date: Fri, 21 Aug 2015 13:40:36 +0300 Subject: [PATCH] IDEA-144173 IDEA launched via idea.sh on Mac OS fails to start with "Cannot find VM options file" error, though bin/mac/idea.vmoptions file exists in ZIP distribution --- bin/scripts/unix/idea.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/scripts/unix/idea.sh b/bin/scripts/unix/idea.sh index 730674dec85e..03d086d3b5f0 100755 --- a/bin/scripts/unix/idea.sh +++ b/bin/scripts/unix/idea.sh @@ -136,12 +136,12 @@ if [ -n "$@@product_uc@@_PROPERTIES" ]; then IDE_PROPERTIES_PROPERTY="-Didea.properties.file=$@@product_uc@@_PROPERTIES" fi -vm_options_file="$IDE_BIN_HOME/@@vm_options@@$BITS.vmoptions" +vm_options_file="$OS_SPECIFIC_BIN_DIR/@@vm_options@@$BITS.vmoptions" user_vm_options_file="$HOME/.@@system_selector@@/@@vm_options@@$BITS.vmoptions" if [ -r "$user_vm_options_file" ]; then vm_options_file="$user_vm_options_file" fi -if [ -n "$@@product_uc@@_VM_OPTIONS" ]; then +if [ -n "$@@product_uc@@_VM_OPTIONS" ] && [ -r "$@@product_uc@@_VM_OPTIONS" ]; then vm_options_file="$@@product_uc@@_VM_OPTIONS" fi @@ -184,5 +184,6 @@ LD_LIBRARY_PATH="$IDE_BIN_HOME:$LD_LIBRARY_PATH" "$JDK/jre/bin/java" \ com.intellij.idea.Main \ "$@" EC=$? -test $EC -ne 88 && exit $EC -exec "$0" "$@" +exit $EC +# test $EC -ne 88 && exit $EC +# exec "$0" "$@"