Closed reosablo closed 1 year ago
This is a small reproducible code:
// example.ts import yargs from "https://deno.land/x/yargs@v17.0.1-deno/deno.ts"; yargs().env().parse([]);
deno run example.ts # uncaught error: permission denied deno run --allow-env example.ts # uncaught error: Object.keys(undefined)
Maybe, that's because env() in deno.ts:12:14 returns nothing and doesn't handle PermissionDenied errors like this:
env()
deno.ts:12:14
PermissionDenied
env: () => { Deno.env.toObject() },
Can I make PR to fix this?
@MaikuMori I didn't follow this issue but it seems to have been fixed in #432.
This is a small reproducible code:
Maybe, that's because
env()
indeno.ts:12:14
returns nothing and doesn't handlePermissionDenied
errors like this: