Commit 7797d212 authored by yann300's avatar yann300

keep context for next runs

parent 70546d72
......@@ -687,7 +687,7 @@ class Terminal {
try {
var cmds = vm.createContext(Object.assign(self._jsSandboxContext, context))
var result = vm.runInContext(script, cmds)
self._jsSandboxContext = Object.assign({}, context)
self._jsSandboxContext = Object.assign(cmds, context)
done(null, result)
} catch (error) {
done(error.message)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment