docker
docker copied to clipboard
fix: grep pattern fixed to remove line comments
:wave: I did some awesome work for the Pelias project and would love for everyone to have a look at it and provide feedback.
Here's the reason for this change :rocket:
- Running
pelias
yields the errorgrep: warning: stray \ before #
. - Line comments were not removed by grep pattern.
Here's what actually got changed :clap:
- This can be fixed by not escaping
#
in the grep pattern. - The grep pattern: There was a end-of-line anchor
$
after a pattern for white-spaces\s*
before the line-comment character#
. This was changed to^\s*#
which remove lines starting with 0 or more whitespace characters followed by#
.
Here's how others can test the changes :eyes:
Run the pelias
command and check if loading .env variables does still work as expected/is now fixed. Especially if line comments (with and without whitespace before #
) get removed.