diff options
author | Jaap Aarts <JAicewizard@users.noreply.github.com> | 2020-06-12 16:59:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-12 10:59:51 -0400 |
commit | 3eee9614732ed8636bb8ebbd6f6a13d44531df6c (patch) | |
tree | de6543a88ec637aec373d0d425bdf958077d89df /cli | |
parent | 93573afe8262efa21cf68269618b4416001ea609 (diff) |
document "deno run -" (#6256)
Diffstat (limited to 'cli')
-rw-r--r-- | cli/flags.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cli/flags.rs b/cli/flags.rs index 61ce401a4..95be8b585 100644 --- a/cli/flags.rs +++ b/cli/flags.rs @@ -1037,9 +1037,9 @@ fn run_subcommand<'a, 'b>() -> App<'a, 'b> { run_test_args(SubCommand::with_name("run")) .setting(AppSettings::TrailingVarArg) .arg(script_arg()) - .about("Run a program given a filename or url to the module") + .about("Run a program given a filename or url to the module. Use '-' as a filename to read from stdin.") .long_about( - "Run a program given a filename or url to the module. + "Run a program given a filename or url to the module. By default all programs are run in sandbox without access to disk, network or ability to spawn subprocesses. @@ -1052,7 +1052,10 @@ Grant permission to read from disk and listen to network: deno run --allow-read --allow-net https://deno.land/std/http/file_server.ts Grant permission to read whitelisted files from disk: - deno run --allow-read=/etc https://deno.land/std/http/file_server.ts", + deno run --allow-read=/etc https://deno.land/std/http/file_server.ts + +Deno allows specifying the filename '-' to read the file from stdin. + curl https://deno.land/std/examples/welcome.ts | target/debug/deno run -", ) } |