Skip to content
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

Do not end LOG_LEVEL environment variable with newline (set by base-addon-log-level script) #248

Merged
merged 1 commit into from
Jul 17, 2023

Conversation

lmagyar
Copy link
Contributor

@lmagyar lmagyar commented Jul 9, 2023

Proposed Changes

None of the variables in /var/run/s6/container_environment contains a newline at the end, only the LOG_LEVEL when set by the base-addon-log-level script.

The newline breaks code like "${__BASHIO_LOG_LEVELS[${__BASHIO_LOG_LEVEL}],,}"

Related Issues

@@ -44,6 +44,6 @@ if bashio::config.exists log_level; then
esac

# Save determined log level so S6 can pick it up later
echo "${log_level}" > /var/run/s6/container_environment/LOG_LEVEL
echo -n "${log_level}" > /var/run/s6/container_environment/LOG_LEVEL
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or maybe a printf "${log_level}" > ... would be even better.

Copy link
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

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

Thanks, @lmagyar 👍

../Frenck

@frenck frenck added the bugfix Inconsistencies or issues which will cause a problem for users or implementors. label Jul 17, 2023
@frenck frenck merged commit 696ae6e into hassio-addons:main Jul 17, 2023
13 of 14 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jul 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bugfix Inconsistencies or issues which will cause a problem for users or implementors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants