-
Notifications
You must be signed in to change notification settings - Fork 437
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
Dotenv run resolve path #507
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Default expansion is more strict now (undefined vs. empty). The supported set is closer to what is available in docker-compose See: https://docs.docker.com/compose/environment-variables/env-file/
Single quoted strings do not expand variables in bash. I think the libary was missing a simple way to selectively disable variable expansion.
Error results in no quote.
I corrected flake8 errors in this commit. test_parser.py had a lot of long lines, formatted it with black. Importing sh is done in try/except. Although the package is available for Windows, it is failing on import. Moved previous manual tests into proper pytest. Utility for simulating Windows os.environment behavior moved to a separate file.
This commit brings back the old interface for `resolve_variables`. I realized it might be actually used by the clients. I made _resolve_bindings private. Created resolve_variable as a result of refactoring. It be as useful as resolve_variables for the clients.
With an option to have a different behavior for single quoted strings it would be nice to use mixed string (e.g. "ffo"'${bar}' to produce "foo${bar}". Intruduced it by reading multiple strings on the value side. Unquoted strings are tricky because of the whitespace and comments. All the rest should come for free, as it is a change from handling a single value to handling a list of values and concatenation.
There was actually one bug detected by the typing check. Value without '=' did not work properly. Added a test for that.
Add windows to tested operating systems
Addresses non-intuitive behavior of `dotenv run python ...` on Windows
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.