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

Make deno --env-file work like --env #24528

Closed
birkskyum opened this issue Jul 11, 2024 · 0 comments · Fixed by #24555
Closed

Make deno --env-file work like --env #24528

birkskyum opened this issue Jul 11, 2024 · 0 comments · Fixed by #24555

Comments

@birkskyum
Copy link
Contributor

birkskyum commented Jul 11, 2024

I suggest making --env-file work like --env for the following two reasons:

  1. It's more obvious that it'll take a path to an .env file and not i.e. a ENV_VARIABLE=VALUE pair, or like jest --env takes an environment such as jsdom. This would clear up confusion with the Deno API's that actually does take variables such as --allow-env and --deny-env:
      --allow-env[=<VARIABLE_NAME>...]
          Allow access to system environment information. Optionally specify accessible environment variables.
          Docs: https://deno.land/manual@v1.45.5/basics/permissions
          Examples:
            --allow-env
            --allow-env="PORT,HOME,PATH"

      --deny-env[=<VARIABLE_NAME>...]
          Deny access to system environment information. Optionally specify accessible environment variables.
          Docs: https://deno.land/manual@v1.45.5/basics/permissions
          Examples:
            --deny-env
            --deny-env="PORT,HOME,PATH"
  1. It's called --env-file in both node and bun, and having it be the same in Deno reduces cognitive overhead, and mitigate migration issues.
@birkskyum birkskyum changed the title Rename or map --env to --env-file Rename deno --env to deno --env-file Jul 12, 2024
@birkskyum birkskyum changed the title Rename deno --env to deno --env-file Alias deno --env-file to deno --env Aug 2, 2024
@birkskyum birkskyum changed the title Alias deno --env-file to deno --env Make deno --env-file work like '--env' Aug 2, 2024
@birkskyum birkskyum changed the title Make deno --env-file work like '--env' Make deno --env-file work like --env Aug 2, 2024
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

Successfully merging a pull request may close this issue.

1 participant