1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-01 09:24:20 -04:00
Commit graph

7 commits

Author SHA1 Message Date
Bartek Iwańczuk
f32c31a0eb dx: descriptive permission errors (#3808)
Before:
```
▶ target/debug/deno https://deno.land/std/examples/echo_server.ts
error: Uncaught PermissionDenied: run again with the --allow-net flag
► $deno$/dispatch_json.ts:40:11
    at DenoError ($deno$/errors.ts:20:5)
    at unwrapResponse ($deno$/dispatch_json.ts:40:11)
    at sendSync ($deno$/dispatch_json.ts:67:10)
    at listen ($deno$/net.ts:170:15)
    at https://deno.land/std/examples/echo_server.ts:4:23
```

```
▶ target/debug/deno --allow-read=/usr https://deno.land/std/examples/cat.ts /etc/passwd
error: Uncaught PermissionDenied: run again with the --allow-read flag
► $deno$/dispatch_json.ts:40:11
    at DenoError ($deno$/errors.ts:20:5)
    at unwrapResponse ($deno$/dispatch_json.ts:40:11)
    at sendAsync ($deno$/dispatch_json.ts:91:10)
```

After:
```
▶ target/debug/deno https://deno.land/std/examples/echo_server.ts
error: Uncaught PermissionDenied: network access to "0.0.0.0:8080", run again with the --allow-net flag
► $deno$/dispatch_json.ts:40:11
    at DenoError ($deno$/errors.ts:20:5)
    at unwrapResponse ($deno$/dispatch_json.ts:40:11)
    at sendSync ($deno$/dispatch_json.ts:67:10)
    at listen ($deno$/net.ts:170:15)
    at https://deno.land/std/examples/echo_server.ts:4:23
```

```
▶ target/debug/deno --allow-read=/usr https://deno.land/std/examples/cat.ts /etc/passwd
error: Uncaught PermissionDenied: read access to "/etc/passwd", run again with the --allow-read flag
► $deno$/dispatch_json.ts:40:11
    at DenoError ($deno$/errors.ts:20:5)
    at unwrapResponse ($deno$/dispatch_json.ts:40:11)
    at sendAsync ($deno$/dispatch_json.ts:91:10)
```
2020-01-27 21:13:17 -05:00
Ry Dahl
a4dde552de
Revert "feat(flags): script arguments come after '--'" (#3681)
Due to complaints about ergonomics and because it breaks shebang on
linux.

This reverts commit 2d5457df15.

BREAKING CHANGE
2020-01-15 19:21:35 -05:00
Ry Dahl
2d5457df15
feat(flags): script arguments come after '--' (#3621) 2020-01-08 14:59:53 -05:00
Ry Dahl
bfab4ed0df
Happy new year! (#3578) 2020-01-02 15:13:47 -05:00
Axetroy
8cf8a29d35 fix permission errors are swallowed by fs.exists (#3493) 2019-12-13 22:47:09 +08:00
Nayeem Rahman
f51dcc12d7 std: Move fs/path to the top-level (#3100) 2019-10-16 14:39:33 -04:00
Ryan Dahl
151ce0266e
Move everything into std subdir 2019-10-09 17:10:09 -04:00
Renamed from fs/exists_test.ts (Browse further)