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

fix quote stripping #166

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

almdudler777
Copy link

Hi,

When running from .env file quotes will be correctly stripped in the current version.

But when that same .env file is loaded through a docker-compose.yml
it will internally be loaded through os.environ and not be stripped of quotes.

This commit fixes and synchronizes this behaviour.

When running from .env file quotes will be correctly stripped in the previous version.

But when that same file is loaded through a docker-compose.yml it will internally be loaded through os.environ and not be stripped of quotes. This commit fixes and synchronises this behaviour.
@almdudler777
Copy link
Author

On second thought, it might be better to apply the stripping only to values casted to non-string types.

Reason:
I'm unsure about what will happen to something like PATH="/some/path/with whitespace" myprogram.py
In an .env file quotes should be optional as the equal (=) sign and the line-break are the separators.
On the cmd-line paths with whitespace in them need to be surrounded by quotes as the whitespace is a reserved character.

@henriquebastos
Copy link
Collaborator

Can you provide regression tests to expose the problem and the actual fix?

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 this pull request may close these issues.

2 participants