aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd/command.cc
diff options
context:
space:
mode:
authorBen Burdette <bburdette@protonmail.com>2022-05-19 11:07:18 -0600
committerBen Burdette <bburdette@protonmail.com>2022-05-19 11:07:18 -0600
commitf9cdb6af8dea863b325210d59a1f2e865a06010e (patch)
tree540b9dbdd53fbeb79320f846c92706d234b2e422 /src/libcmd/command.cc
parent667074b5867ffe40e3f1c59bd8e4ebf259f86aaa (diff)
parent357fb84dbaad0b056704915c6a43764cda63ee7f (diff)
Merge branch 'debug-exploratory-PR' into debuggerHook-eval-arg
Diffstat (limited to 'src/libcmd/command.cc')
-rw-r--r--src/libcmd/command.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libcmd/command.cc b/src/libcmd/command.cc
index ee5102a6a..9cf2ff5e3 100644
--- a/src/libcmd/command.cc
+++ b/src/libcmd/command.cc
@@ -137,9 +137,10 @@ ref<EvalState> EvalCommand::getEvalState()
if (error)
printError("%s\n\n" ANSI_BOLD "Starting REPL to allow you to inspect the current state of the evaluator.\n" ANSI_NORMAL, error->what());
- if (expr.staticEnv) {
- auto vm = mapStaticEnvBindings(evalState.symbols, *expr.staticEnv.get(), env);
- runRepl(*const_cast<EvalState*>(&evalState), *vm);
+ auto se = evalState->getStaticEnv(expr);
+ if (se) {
+ auto vm = mapStaticEnvBindings(evalState->symbols, *se.get(), env);
+ runRepl(evalState, *vm);
}
};
}