1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-03 04:48:52 -05:00

fixed double prompt in manual (#6230)

This commit is contained in:
Tomofumi Chiba 2020-06-11 09:24:41 +09:00 committed by GitHub
parent e4e332abbb
commit a1b37f177b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 9 deletions

View file

@ -18,5 +18,5 @@ HTTP server listening on http://0.0.0.0:4500/
And if you ever want to upgrade to the latest published version: And if you ever want to upgrade to the latest published version:
```shell ```shell
$ file_server --reload file_server --reload
``` ```

View file

@ -57,7 +57,7 @@ error: Uncaught PermissionDenied: read access to "/etc/passwd", run again with t
Try it out again with the correct permissions by whitelisting `/etc` instead: Try it out again with the correct permissions by whitelisting `/etc` instead:
```shell ```shell
$ deno run --allow-read=/etc https://deno.land/std/examples/cat.ts /etc/passwd deno run --allow-read=/etc https://deno.land/std/examples/cat.ts /etc/passwd
``` ```
`--allow-write` works the same as `--allow-read`. `--allow-write` works the same as `--allow-read`.
@ -73,7 +73,7 @@ const result = await fetch("https://deno.land/");
This is an example on how to whitelist hosts/urls: This is an example on how to whitelist hosts/urls:
```shell ```shell
$ deno run --allow-net=github.com,deno.land fetch.ts deno run --allow-net=github.com,deno.land fetch.ts
``` ```
If `fetch.ts` tries to establish network connections to any other domain, the If `fetch.ts` tries to establish network connections to any other domain, the
@ -82,5 +82,5 @@ process will fail.
Allow net calls to any host/url: Allow net calls to any host/url:
```shell ```shell
$ deno run --allow-net fetch.ts deno run --allow-net fetch.ts
``` ```

View file

@ -48,7 +48,7 @@ TS2339 [ERROR]: Property 'utimeSync' does not exist on type 'typeof Deno'.
Solution to that problem requires adding `--unstable` flag: Solution to that problem requires adding `--unstable` flag:
```shell ```shell
$ deno run --allow-read --allow-write --unstable main.ts deno run --allow-read --allow-write --unstable main.ts
``` ```
To make sure that API producing error is unstable check To make sure that API producing error is unstable check

View file

@ -22,7 +22,7 @@ $ deno install --allow-net --allow-read https://deno.land/std/http/file_server.t
To change the executable name, use `-n`/`--name`: To change the executable name, use `-n`/`--name`:
```shell ```shell
deno install --allow-net --allow-read -n serve https://deno.land/std/http/file_server.ts deno install --allow-net --allow-read -n serve https://deno.land/std/http/file_server.ts
``` ```
The executable name is inferred by default: The executable name is inferred by default:
@ -36,7 +36,7 @@ The executable name is inferred by default:
To change the installation root, use `--root`: To change the installation root, use `--root`:
```shell ```shell
$ deno install --allow-net --allow-read --root /usr/local https://deno.land/std/http/file_server.ts deno install --allow-net --allow-read --root /usr/local https://deno.land/std/http/file_server.ts
``` ```
The installation root is determined, in order of precedence: The installation root is determined, in order of precedence:
@ -48,14 +48,14 @@ The installation root is determined, in order of precedence:
These must be added to the path manually if required. These must be added to the path manually if required.
```shell ```shell
$ echo 'export PATH="$HOME/.deno/bin:$PATH"' >> ~/.bashrc echo 'export PATH="$HOME/.deno/bin:$PATH"' >> ~/.bashrc
``` ```
You must specify permissions that will be used to run the script at installation You must specify permissions that will be used to run the script at installation
time. time.
```shell ```shell
$ deno install --allow-net --allow-read https://deno.land/std/http/file_server.ts 8080 deno install --allow-net --allow-read https://deno.land/std/http/file_server.ts 8080
``` ```
The above command creates an executable called `file_server` that runs with The above command creates an executable called `file_server` that runs with