summaryrefslogtreecommitdiff
path: root/src/flags.rs
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2018-11-15 20:07:40 -0800
committerRyan Dahl <ry@tinyclouds.org>2018-11-16 12:07:40 +0800
commit48bf4062e4359674e1a417100eb76a6347e77fc1 (patch)
treee52f2c6c63a2afcdf2d5efc059e43c7f55f2c653 /src/flags.rs
parent9b702da9e53b6efbc7a333380bcfb3d57733730e (diff)
First pass at running subprocesses (#1156)
Diffstat (limited to 'src/flags.rs')
-rw-r--r--src/flags.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/flags.rs b/src/flags.rs
index dbbe51684..fcc0d0461 100644
--- a/src/flags.rs
+++ b/src/flags.rs
@@ -25,6 +25,7 @@ pub struct DenoFlags {
pub allow_write: bool,
pub allow_net: bool,
pub allow_env: bool,
+ pub allow_run: bool,
pub types: bool,
}
@@ -93,10 +94,9 @@ fn set_recognized_flags(
if matches.opt_present("allow-env") {
flags.allow_env = true;
}
- // TODO: uncomment once https://github.com/denoland/deno/pull/1156 lands on master
- // if matches.opt_present("allow-run") {
- // flags.allow_run = true;
- // }
+ if matches.opt_present("allow-run") {
+ flags.allow_run = true;
+ }
if matches.opt_present("types") {
flags.types = true;
}
@@ -126,6 +126,7 @@ pub fn set_flags(
opts.optflag("", "allow-write", "Allow file system write access.");
opts.optflag("", "allow-net", "Allow network access.");
opts.optflag("", "allow-env", "Allow environment access.");
+ opts.optflag("", "allow-run", "Allow running subprocesses.");
opts.optflag("", "recompile", "Force recompilation of TypeScript code.");
opts.optflag("h", "help", "Print this message.");
opts.optflag("D", "log-debug", "Log debug output.");