diff options
author | Tor Norbye <tnorbye@google.com> | 2014-08-20 17:01:23 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2014-08-20 17:01:23 -0700 |
commit | 1aa2e09bdbd413eacb677e9fa4b50630530d0656 (patch) | |
tree | 2f4cc6d69645bd460aa253fdecb606d764fbd25d /platform/platform-impl/src/com/intellij/ide/actions/CreateLauncherScriptAction.java | |
parent | 02cf98d65c798d368fcec43ed64a001d513bdd4f (diff) | |
download | idea-1aa2e09bdbd413eacb677e9fa4b50630530d0656.tar.gz |
Snapshot idea/138.1696 from git://git.jetbrains.org/idea/community.git
Change-Id: I50c97b83a815ce635e49a38380ba5b8765e4b16a
Diffstat (limited to 'platform/platform-impl/src/com/intellij/ide/actions/CreateLauncherScriptAction.java')
-rw-r--r-- | platform/platform-impl/src/com/intellij/ide/actions/CreateLauncherScriptAction.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/platform/platform-impl/src/com/intellij/ide/actions/CreateLauncherScriptAction.java b/platform/platform-impl/src/com/intellij/ide/actions/CreateLauncherScriptAction.java index b76839fbffe4..411f2d9d93bb 100644 --- a/platform/platform-impl/src/com/intellij/ide/actions/CreateLauncherScriptAction.java +++ b/platform/platform-impl/src/com/intellij/ide/actions/CreateLauncherScriptAction.java @@ -45,6 +45,7 @@ import static java.util.Arrays.asList; */ public class CreateLauncherScriptAction extends DumbAwareAction { private static final Logger LOG = Logger.getInstance("#com.intellij.ide.actions.CreateLauncherScriptAction"); + private static final String CONTENTS = "/Contents"; public static boolean isAvailable() { return SystemInfo.isUnix; @@ -137,6 +138,8 @@ public class CreateLauncherScriptAction extends DumbAwareAction { // for Macs just use "*.app" final String productName = ApplicationNamesInfo.getInstance().getProductName().toLowerCase(); runPath += "/bin/" + productName + ".sh"; + } else if (runPath.endsWith(CONTENTS)) { + runPath = runPath.substring(0, runPath.length() - CONTENTS.length()); } String launcherContents = ExecUtil.loadTemplate(CreateLauncherScriptAction.class.getClassLoader(), "launcher.py", newHashMap(asList("$CONFIG_PATH$", "$RUN_PATH$"), |