Convert all entrypoint "echo"s to "printf"#1024
Merged
yosifkit merged 1 commit intodocker-library:masterfrom Dec 21, 2022
Merged
Convert all entrypoint "echo"s to "printf"#1024yosifkit merged 1 commit intodocker-library:masterfrom
yosifkit merged 1 commit intodocker-library:masterfrom
Conversation
The use of the `echo` shell built-in has been actively discouraged for a long time, but it's really convenient so we keep doing it. This converts them all to use `printf` appropriately such that we avoid issues like `echo "$someVar"` from doing the wrong thing if `$someVar` is `-n` or similar.
docker-library-bot
added a commit
to docker-library-bot/official-images
that referenced
this pull request
Dec 22, 2022
Changes: - docker-library/postgres@7a852f4: Merge pull request docker-library/postgres#1024 from infosiftr/no-echo - docker-library/postgres@7e5e7ec: Convert all entrypoint "echo"s to "printf" - docker-library/postgres@f8827c3: Update generated README
stanhu
added a commit
to stanhu/postgres
that referenced
this pull request
Dec 22, 2022
docker-library#1024 converted all `echo` calls to `printf`, but this change causes the password file used by `initdb` to be blank rather than contain a single new line. As a result, `initdb` will fail to start with an empty value with the error: ``` initdb: error: password file "/dev/fd/63" is empty ``` `POSTGRES_PASSWORD` can be blank if `POSTGRES_HOST_AUTH_METHOD=trust` is used. This change adds a newline to restore the original behavior. Closes docker-library#1025
stanhu
added a commit
to stanhu/postgres
that referenced
this pull request
Dec 22, 2022
docker-library#1024 converted all `echo` calls to `printf`, but this change causes the password file used by `initdb` to be blank rather than contain a single newline. As a result, `initdb` will fail to start with an empty value with the error: ``` initdb: error: password file "/dev/fd/63" is empty ``` `POSTGRES_PASSWORD` can be blank if `POSTGRES_HOST_AUTH_METHOD=trust` is used. This change adds a newline to restore the original behavior. Closes docker-library#1025
bicrypt
pushed a commit
to panascais-docker/postgresql
that referenced
this pull request
Mar 18, 2023
docker-library/postgres#1024 converted all `echo` calls to `printf`, but this change causes the password file used by `initdb` to be blank rather than contain a single newline. As a result, `initdb` will fail to start with an empty value with the error: ``` initdb: error: password file "/dev/fd/63" is empty ``` `POSTGRES_PASSWORD` can be blank if `POSTGRES_HOST_AUTH_METHOD=trust` is used. This change adds a newline to restore the original behavior. Closes #1025
This file contains hidden or 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
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.
The use of the
echoshell built-in has been actively discouraged for a long time, but it's really convenient so we keep doing it. This converts them all to useprintfappropriately such that we avoid issues likeecho "$someVar"from doing the wrong thing if$someVaris-nor similar.Closes #1023