From 188f1411e121e8ee8975b760fa64ae9648c86f12 Mon Sep 17 00:00:00 2001 From: "Vladimir.Orlov" Date: Tue, 25 Aug 2015 15:37:18 +0300 Subject: [PATCH] IDEA-144319 When starting Idea from terminal error "Cannot find VM options file" appears but Idea starts successfully --- bin/scripts/unix/idea.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/scripts/unix/idea.sh b/bin/scripts/unix/idea.sh index 03d086d3b5f0..f20ed48714d5 100755 --- a/bin/scripts/unix/idea.sh +++ b/bin/scripts/unix/idea.sh @@ -136,7 +136,10 @@ if [ -n "$@@product_uc@@_PROPERTIES" ]; then IDE_PROPERTIES_PROPERTY="-Didea.properties.file=$@@product_uc@@_PROPERTIES" fi -vm_options_file="$OS_SPECIFIC_BIN_DIR/@@vm_options@@$BITS.vmoptions" +vm_options_file="$IDE_BIN_HOME/@@vm_options@@$BITS.vmoptions" +if [ ! -r "$vm_options_file" ]; then + vm_options_file="$OS_SPECIFIC_BIN_DIR/@@vm_options@@$BITS.vmoptions" +fi 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" @@ -184,6 +187,5 @@ LD_LIBRARY_PATH="$IDE_BIN_HOME:$LD_LIBRARY_PATH" "$JDK/jre/bin/java" \ com.intellij.idea.Main \ "$@" EC=$? -exit $EC -# test $EC -ne 88 && exit $EC -# exec "$0" "$@" +test $EC -ne 88 && exit $EC +exec "$0" "$@"