Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yargs().env() always fails in deno runtime #405

Closed
reosablo opened this issue Jun 27, 2021 · 2 comments
Closed

yargs().env() always fails in deno runtime #405

reosablo opened this issue Jun 27, 2021 · 2 comments

Comments

@reosablo
Copy link

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.env.toObject()
  },
@MaikuMori
Copy link

Can I make PR to fix this?

@reosablo
Copy link
Author

@MaikuMori
I didn't follow this issue but it seems to have been fixed in #432.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants