Skip to content

Commit 389fc01

Browse files
committed
fix(idea): incorrect command line for jvm main entrypoint
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
1 parent 9c2acd4 commit 389fc01

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

packages/plugin-idea/src/main/kotlin/dev/elide/intellij/Constants.kt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,14 @@ object Constants {
5252
/** Browser URL for the installation section of the documentation. */
5353
const val INSTALL_URL = "https://docs.elide.dev/installation"
5454

55+
// command names
56+
const val COMMAND_RUN = "run"
57+
const val COMMAND_BUILD = "build"
58+
const val COMMAND_INSTALL = "install"
59+
const val COMMAND_SERVE = "serve"
60+
5561
/** Commands available to all projects by default. */
56-
val DEFAULT_COMMANDS = arrayOf("install", "build", "run", "serve")
62+
val DEFAULT_COMMANDS = arrayOf(COMMAND_BUILD, COMMAND_INSTALL, COMMAND_RUN, COMMAND_SERVE)
5763

5864
/** Descriptor for a file chooser to be used when selecting an Elide project. */
5965
@JvmStatic fun projectFileChooser(): FileChooserDescriptor {
@@ -101,8 +107,4 @@ object Constants {
101107
return getMessage(key, params = params)
102108
}
103109
}
104-
105-
data object Commands {
106-
const val RUN = "run"
107-
}
108110
}

packages/plugin-idea/src/main/kotlin/dev/elide/intellij/project/model/ElideProjectData.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,7 @@ data class ElideEntrypointInfo(
8888

8989
/** Returns the raw base command line for the Elide CLI that can be used to invoke this entrypoint. */
9090
val ElideEntrypointInfo.fullCommandLine: String
91-
get() = "${Constants.Commands.RUN} $value"
91+
get() = when (kind) {
92+
ElideEntrypointInfo.Kind.JvmMainClass -> Constants.COMMAND_RUN
93+
else -> "${Constants.COMMAND_RUN} $value"
94+
}

0 commit comments

Comments
 (0)