python-decouple
python-decouple copied to clipboard
fix quote stripping
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.
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.
Can you provide regression tests to expose the problem and the actual fix?