-
-
Notifications
You must be signed in to change notification settings - Fork 861
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
Remove comments while parsing/Support inline comments #484
Comments
I'll like to second this request. I just got bit by this expectation as well. Issue #156 addressed this, but was closed saying that dotenv is expected to be just like a .ini file. Except that it's in the format of Unix shell variables, and most shells support inline comments in their configuration files. So the expectation is that this is supported. Nor is the issue immediately obvious, since |
dotenv currently doesn't support inline comments (see motdotla/dotenv#484), so it's misleading to use inline comments in documentation examples.
dotenv currently doesn't support inline comments (see motdotla/dotenv#484), so it's misleading to use inline comments in documentation examples.
I got the same issue. After searching for comment syntax, I found https://github.com/vlucas/phpdotenv#comments which is a PHP implementation that allows comments after the key-value. I think it is important to keep parity between Original Ruby Dotenv comment syntax: https://github.com/bkeepers/dotenv#comments |
dotenv does not actually support inline comments, so these comments were being parsed incorrectly as part of the environment variable values. Upstream issue: motdotla/dotenv#484 This also groups and sorts the environment variables for readability, and removes the quotes around values. (Quotes should probably only be used around values with significant spaces, to avoid confusion.)
…d format dotenv does not actually support inline comments, so these comments were being parsed incorrectly as part of the environment variable values. Upstream issue: motdotla/dotenv#484 This also groups and sorts the environment variables for readability, and removes the quotes around values. (Quotes should probably only be used around values with significant spaces, to avoid confusion.)
…d format dotenv does not actually support inline comments, so these comments were being parsed incorrectly as part of the environment variable values. Upstream issue: motdotla/dotenv#484 This also groups and sorts the environment variables for readability, and removes the quotes around values. (Quotes should probably only be used around values with significant spaces, to avoid confusion.)
…d format dotenv does not actually support inline comments, so these comments were being parsed incorrectly as part of the environment variable values. Upstream issue: motdotla/dotenv#484 This also groups and sorts the environment variables for readability, and removes the quotes around values. (Quotes should probably only be used around values with significant spaces, to avoid confusion.)
…d format dotenv does not actually support inline comments, so these comments were being parsed incorrectly as part of the environment variable values. Upstream issue: motdotla/dotenv#484 This also groups and sorts the environment variables for readability, and removes the quotes around values. (Quotes should probably only be used around values with significant spaces, to avoid confusion.)
…d format dotenv does not actually support inline comments, so these comments were being parsed incorrectly as part of the environment variable values. Upstream issue: motdotla/dotenv#484 This also groups and sorts the environment variables for readability, and removes the quotes around values. (Quotes should probably only be used around values with significant spaces, to avoid confusion.)
…d format dotenv does not actually support inline comments, so these comments were being parsed incorrectly as part of the environment variable values. Upstream issue: motdotla/dotenv#484 This also groups and sorts the environment variables for readability, and removes the quotes around values. (Quotes should probably only be used around values with significant spaces, to avoid confusion.)
…d format dotenv does not actually support inline comments, so these comments were being parsed incorrectly as part of the environment variable values. Upstream issue: motdotla/dotenv#484 This also groups and sorts the environment variables for readability, and removes the quotes around values. (Quotes should probably only be used around values with significant spaces, to avoid confusion.)
…d format dotenv does not actually support inline comments, so these comments were being parsed incorrectly as part of the environment variable values. Upstream issue: motdotla/dotenv#484 This also groups and sorts the environment variables for readability, and removes the quotes around values. (Quotes should probably only be used around values with significant spaces, to avoid confusion.)
…d format dotenv does not actually support inline comments, so these comments were being parsed incorrectly as part of the environment variable values. Upstream issue: motdotla/dotenv#484 This also groups and sorts the environment variables for readability, and removes the quotes around values. (Quotes should probably only be used around values with significant spaces, to avoid confusion.)
I agree that dotenv should support comments. It follows the principle of least surprise and makes for a nice developer experience. I am closing this issue and instead tracking here: #524 |
…d format dotenv does not actually support inline comments, so these comments were being parsed incorrectly as part of the environment variable values. Upstream issue: motdotla/dotenv#484 This also groups and sorts the environment variables for readability, and removes the quotes around values. (Quotes should probably only be used around values with significant spaces, to avoid confusion.)
…d format dotenv does not actually support inline comments, so these comments were being parsed incorrectly as part of the environment variable values. Upstream issue: motdotla/dotenv#484 This also groups and sorts the environment variables for readability, and removes the quotes around values. (Quotes should probably only be used around values with significant spaces, to avoid confusion.)
…d format dotenv does not actually support inline comments, so these comments were being parsed incorrectly as part of the environment variable values. Upstream issue: motdotla/dotenv#484 This also groups and sorts the environment variables for readability, and removes the quotes around values. (Quotes should probably only be used around values with significant spaces, to avoid confusion.)
…d format dotenv does not actually support inline comments, so these comments were being parsed incorrectly as part of the environment variable values. Upstream issue: motdotla/dotenv#484 This also groups and sorts the environment variables for readability, and removes the quotes around values. (Quotes should probably only be used around values with significant spaces, to avoid confusion.)
…d format dotenv does not actually support inline comments, so these comments were being parsed incorrectly as part of the environment variable values. Upstream issue: motdotla/dotenv#484 This also groups and sorts the environment variables for readability, and removes the quotes around values. (Quotes should probably only be used around values with significant spaces, to avoid confusion.)
…d format dotenv does not actually support inline comments, so these comments were being parsed incorrectly as part of the environment variable values. Upstream issue: motdotla/dotenv#484 This also groups and sorts the environment variables for readability, and removes the quotes around values. (Quotes should probably only be used around values with significant spaces, to avoid confusion.)
…d format dotenv does not actually support inline comments, so these comments were being parsed incorrectly as part of the environment variable values. Upstream issue: motdotla/dotenv#484 This also groups and sorts the environment variables for readability, and removes the quotes around values. (Quotes should probably only be used around values with significant spaces, to avoid confusion.)
* chore(deps): add mocked-env yarn add --dev mocked-env * chore(deps): add dotenv (for tests) yarn add --dev dotenv * test(common): add helpers: withMockedEnv, hasAllKeys * test(config): add initial tests for config accessors These are mainly to capture the current behaviour, before making any major changes. * refactor(config): ensure AppConfig.port is a number * style(config): avoid redundant ternary * fix(config): make S3 details optional when LOCAL_OBJECT_STORAGE=true * fix(config): remove unsupported inline comments from .env.example, and format dotenv does not actually support inline comments, so these comments were being parsed incorrectly as part of the environment variable values. Upstream issue: motdotla/dotenv#484 This also groups and sorts the environment variables for readability, and removes the quotes around values. (Quotes should probably only be used around values with significant spaces, to avoid confusion.) * fix(config): add a reasonable default AUTH0_DOMAIN to .env.example This makes it usable as a validated base config. * feat(upload): make UploadOptions type discriminated on useLocal This allows preserving the result of useLocal checks in the type system. * feat(config): use UploadOptions type * chore: include app-config in coverage again Previously excluded by: * #320
In VSCode, when you install the
dotenv
extension, it greys out sections following a hashtag, e.g.:However,
dotenv
the package does not respect that. In fact, I often got burned by the fact that dotenv just straight up includes the comments in the actual value for the environment variable, which is super unintuitive.I'd love it if I could have inline comments without fear of screwing up the environment variables.
Love the work you're doing,
thanks!
The text was updated successfully, but these errors were encountered: