I'm trying out Deno and while running an example, I ran into error:
$ deno run https://deno.land/std/examples/curl.ts https://example.com
Download https://deno.land/std/examples/curl.ts
Warning Implicitly using master branch https://deno.land/std/examples/curl.ts
Compile https://deno.land/std/examples/curl.ts
error: Uncaught PermissionDenied: network access to "https://example.com/", run again with the --allow-net flag
at unwrapResponse ($deno$/ops/dispatch_json.ts:43:11)
at Object.sendAsync ($deno$/ops/dispatch_json.ts:98:10)
at async fetch ($deno$/web/fetch.ts:591:27)
at async https://deno.land/std/examples/curl.ts:3:13
I've tried doing
$ deno run https://deno.land/std/examples/curl.ts https://example.com --allow-net
but still get the same error. What am I doing wrongly?