Skip to content

Ensure newlines are propagated to php.ini settings #13

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

Conversation

weierophinney
Copy link
Member

Bash does not like to capture newlines into variables. As such, this patch concatenates php.ini settings using the string {NL}, which is then translated to a newline when pushing to the php.ini settings file.

Fixes #7

Bash does not like to capture newlines into variables.  As such, this patch concatenates php.ini settings using the string `{NL}`, which is then translated to a newline when pushing to the php.ini settings file.

Fixes laminas#7

Signed-off-by: Matthew Weier O'Phinney <[email protected]>
@weierophinney weierophinney added this to the 1.4.0 milestone Apr 1, 2021
@weierophinney weierophinney added the Bug Something isn't working label Apr 1, 2021
@weierophinney weierophinney merged commit 1ba67b1 into laminas:1.4.x Apr 1, 2021
@weierophinney weierophinney deleted the hotfix/7-ini-concatenation branch April 1, 2021 18:22
@@ -151,7 +151,7 @@ fi

if [[ "${INI}" != "" ]];then
echo "Installing php.ini settings"
echo $INI > /etc/php/${PHP}/cli/conf.d/99-settings.ini
echo $INI | sed "s/{NL}/\n/g" > /etc/php/${PHP}/cli/conf.d/99-settings.ini
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a super dumb "fix", now values can't contain {NL}!
bash has no problems containing newlines!

sending PR with actual fix with quoting echo arguments!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1st of all: there is nothing dumb when not having all scenarios in mind
2nd: you might want to learn how to communicate such problems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Syntax error with ini values in laminas-ci.json
3 participants