summaryrefslogtreecommitdiff
path: root/cli/worker.rs
diff options
context:
space:
mode:
authorJed Fox <git@twopointzero.us>2019-10-02 11:55:28 -0400
committerRyan Dahl <ry@tinyclouds.org>2019-10-02 11:55:28 -0400
commit99eec73b4b8813c6db7cae83f5415b031de0c2c7 (patch)
tree2a64e8dd3a7ae7fc097e14bba432d71193c39c6f /cli/worker.rs
parentc920c5f62aba7eee0f6fa70f68f701e204ac1a9c (diff)
feat: Add support for passing a key to Deno.env() (#2952)
This adds a new op to get a single env var.
Diffstat (limited to 'cli/worker.rs')
-rw-r--r--cli/worker.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/cli/worker.rs b/cli/worker.rs
index 6f5e6af41..9bdf2ae08 100644
--- a/cli/worker.rs
+++ b/cli/worker.rs
@@ -64,6 +64,10 @@ impl Worker {
state_.cli_op(json_op(state_.stateful_op(os::op_set_env))),
);
i.register_op(
+ "get_env",
+ state_.cli_op(json_op(state_.stateful_op(os::op_get_env))),
+ );
+ i.register_op(
"home_dir",
state_.cli_op(json_op(state_.stateful_op(os::op_home_dir))),
);