File tree Expand file tree Collapse file tree
packages/graalvm/src/main/kotlin/elide/runtime/plugins/env Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,8 +33,6 @@ import elide.vm.annotations.Polyglot
3333 * @see EnvConfig
3434 */
3535@DelicateElideApi public class Environment private constructor(public val config : EnvConfig ) {
36- @Volatile private var envInstalled = false
37-
3836 /* * Collect the configured environment variables and keep the ones currently present. */
3937 private val effectiveEnvironment: Map <String , String > by lazy {
4038 config.app.isolatedEnvironmentVariables
@@ -98,10 +96,7 @@ import elide.vm.annotations.Polyglot
9896 */
9997 public fun configure (scope : InstallationScope , context : PolyglotContext , language : GuestLanguage ) {
10098 scope.deferred {
101- if (! envInstalled) {
102- envInstalled = true
103- context.bindings(language).putMember(APP_ENV_BIND_PATH , proxiedEnvMap)
104- }
99+ context.bindings(language).putMember(APP_ENV_BIND_PATH , proxiedEnvMap)
105100 }
106101 }
107102
@@ -138,6 +133,7 @@ import elide.vm.annotations.Polyglot
138133 */
139134 @JvmStatic public fun forLanguage (languageId : String , context : Context ): PolyglotValue {
140135 return context.getBindings(languageId).getMember(APP_ENV_BIND_PATH )
136+ ? : error(" Environment binding is not available for language $languageId in this context" )
141137 }
142138 }
143139}
You can’t perform that action at this time.
0 commit comments