Skip to content

Commit

Permalink
Small fixes in manual.md (#2118)
Browse files Browse the repository at this point in the history
  • Loading branch information
J2P authored and ry committed Apr 15, 2019
1 parent 3bea62d commit 9cb959e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions website/manual.md
Expand Up @@ -277,15 +277,14 @@ the network:


```shellsession ```shellsession
$ deno https://deno.land/std/examples/echo_server.ts $ deno https://deno.land/std/examples/echo_server.ts
⚠️ Deno requests network access to "listen". Grant? [yN] y ⚠️ Deno requests network access to "listen". Grant? [a/y/n/d (a = allow always, y = allow once, n = deny once, d = deny always)]
listening on 0.0.0.0:8080
``` ```


For security reasons, deno does not allow programs to access the network without For security reasons, deno does not allow programs to access the network without
explicit permission. To avoid the console prompt, use a command-line flag: explicit permission. To avoid the console prompt, use a command-line flag:


```shellsession ```shellsession
$ deno https://deno.land/std/examples/echo_server.ts --allow-net $ deno --allow-net https://deno.land/std/examples/echo_server.ts
``` ```


To test it, try sending a HTTP request to it by using curl. The request gets To test it, try sending a HTTP request to it by using curl. The request gets
Expand Down Expand Up @@ -411,7 +410,8 @@ async function main() {
Deno.stdout.write(rawOutput); Deno.stdout.write(rawOutput);
} else { } else {
const rawError = await p.stderrOutput(); const rawError = await p.stderrOutput();
Deno.stdout.write(rawError); const errorString = new TextDecoder().decode(rawError);
console.log(errorString);
} }


Deno.exit(code); Deno.exit(code);
Expand All @@ -423,14 +423,14 @@ main();
When you run it: When you run it:


```shellsession ```shellsession
$ deno ./subprocess.ts --allow-run <somefile> $ deno --allow-run ./subprocess.ts <somefile>
[file content] [file content]


$ deno ./subprocess.ts --allow-run non_existent_file.md $ deno ./subprocess.ts --allow-run non_existent_file.md


Uncaught NotFound: No such file or directory (os error 2) Uncaught NotFound: No such file or directory (os error 2)
at DenoError (deno/js/errors.ts:19:5) at DenoError (deno/js/errors.ts:22:5)
at maybeError (deno/js/errors.ts:38:12) at maybeError (deno/js/errors.ts:41:12)
at handleAsyncMsgFromRust (deno/js/dispatch.ts:27:17) at handleAsyncMsgFromRust (deno/js/dispatch.ts:27:17)
``` ```


Expand Down

0 comments on commit 9cb959e

Please sign in to comment.