Skip to content

Commit

Permalink
fix(cli): apply host access flags.
Browse files Browse the repository at this point in the history
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
  • Loading branch information
darvld committed Nov 1, 2023
1 parent 7884048 commit 4f1c2f7
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ import elide.runtime.Logging
import elide.runtime.core.PolyglotContext
import elide.runtime.core.PolyglotEngine
import elide.runtime.core.PolyglotEngineConfiguration
import elide.runtime.core.PolyglotEngineConfiguration.HostAccess
import elide.runtime.core.extensions.attach
import elide.runtime.gvm.internals.GraalVMGuest
import elide.runtime.gvm.internals.IntrinsicsManager
Expand Down Expand Up @@ -1488,6 +1489,14 @@ import elide.tool.project.ProjectManager
if (debug) debugger.apply(this)
inspector.apply(this)

// configure host access rules
hostAccess = when {
accessControl.allowAll -> HostAccess.ALLOW_ALL
accessControl.allowIo -> HostAccess.ALLOW_IO
accessControl.allowEnv -> HostAccess.ALLOW_ENV
else -> HostAccess.ALLOW_NONE
}

// configure environment variables
appEnvironment.apply(project, this)

Expand Down

0 comments on commit 4f1c2f7

Please sign in to comment.