Skip to content

Optimize newline handling for php.ini files #16

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

Merged
merged 1 commit into from
Apr 7, 2021

Conversation

glensc
Copy link
Contributor

@glensc glensc commented Apr 1, 2021

@boesing boesing changed the title entrypoint: revert dumb fix, quote arguments properly Optimize newline handling for php.ini files Apr 2, 2021
@boesing
Copy link
Member

boesing commented Apr 2, 2021

Please change the commit message to a message which reflects this change.

@weierophinney
Copy link
Member

OMG - thank you! I couldn't figure out why echo $INI was omitting newlines, and was unaware that bash treated echoing a variable differently based on whether it was a bare variable or an interpolated one. (zsh treats both cases exactly the same.)

@weierophinney weierophinney added this to the 1.5.0 milestone Apr 7, 2021
@weierophinney weierophinney merged commit 664aced into laminas:1.5.x Apr 7, 2021
@glensc glensc deleted the patch-1 branch April 7, 2021 20:36
@glensc
Copy link
Contributor Author

glensc commented Apr 7, 2021

@weierophinney install checkbashisms tool, install shellcheck tool. they typically report all such issues that have weird side effects in shell language.

shell quoting is the first issue that comes up when writing shell scripts.

as i can't believe zsh diverges from standard sh with the echo behavior, i made at test:

➔ zsh
glen@rocinante zf1s % a=$(printf "a\nb")
glen@rocinante zf1s % echo $a
a
b
glen@rocinante zf1s % echo "$a"
a
b
glen@rocinante zf1s % bash
$ a=$(printf "a\nb")
$ echo $a
a b
$

learned something myself too!

@glensc
Copy link
Contributor Author

glensc commented Apr 7, 2021

@weierophinney I'm pretty sure you can use zsh in your actions if you want. but then the rest of the world will get confused if sh is not bash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants