Skip to content

Commit de25806

Browse files
committed
Allow embeded option to be set via runtimeProperties
1 parent 1b49ca2 commit de25806

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/main/kotlin/org/jetbrains/kotlin/jupyter/config.kt

+3
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ class RuntimeKernelProperties(val map: Map<String, String>): ReplRuntimeProperti
8181
override val jvmTargetForSnippets by lazy {
8282
map["jvmTargetForSnippets"] ?: JavaRuntime.version
8383
}
84+
override val embedded by lazy {
85+
map["embedded"].toBoolean()
86+
}
8487
}
8588

8689
data class KernelConfig(

src/main/kotlin/org/jetbrains/kotlin/jupyter/repl.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ interface ReplRuntimeProperties {
8989
val currentBranch: String
9090
val currentSha: String
9191
val jvmTargetForSnippets: String
92+
val embedded: Boolean
9293
}
9394

9495
interface ReplOptions {
@@ -139,7 +140,7 @@ class ReplForJupyterImpl(
139140
) : ReplForJupyter, ReplOptions, KotlinKernelHost {
140141

141142
constructor(config: KernelConfig, runtimeProperties: ReplRuntimeProperties, scriptReceivers: List<Any> = emptyList()):
142-
this(config.libraryFactory, config.scriptClasspath, config.homeDir, config.resolverConfig, runtimeProperties, scriptReceivers)
143+
this(config.libraryFactory, config.scriptClasspath, config.homeDir, config.resolverConfig, runtimeProperties, scriptReceivers, runtimeProperties.embedded)
143144

144145
override val currentBranch: String
145146
get() = runtimeProperties.currentBranch

0 commit comments

Comments
 (0)