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

allow case insensitive TRUE/true/True/trUE/etc #65

Merged
merged 1 commit into from
Oct 14, 2023
Merged

Conversation

drizuid
Copy link
Member

@drizuid drizuid commented Oct 14, 2023

linuxserver.io


  • [X ] I have read the contributing guideline and understand that I have made the correct modifications

Description:

https://discord.com/channels/354974912613449730/1162780616228606024
this user put LOG_FILE=TRUE which did not work for log creation because our logic specifically checks for true not TRUE
this change will accept TRUE or true

Benefits of this PR and context:

it's a simple change to cover some case insensitivity issues

How Has This Been Tested?

tested in shell, not in container

Source / References:

devbox ~ # LOG_FILE=True
devbox ~ # if [ "${LOG_FILE,,}" = "true" ]; then echo yep; fi
yep
devbox ~ # LOG_FILE=TRUE
devbox ~ # if [ "${LOG_FILE,,}" = "true" ]; then echo yep; fi
yep
devbox ~ # LOG_FILE=truE
devbox ~ # if [ "${LOG_FILE,,}" = "true" ]; then echo yep; fi
yep
devbox ~ # LOG_FILE=true
devbox ~ # if [ "${LOG_FILE,,}" = "true" ]; then echo yep; fi
yep

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thanks for opening this pull request! Be sure to follow the pull request template!

@drizuid drizuid requested a review from a team October 14, 2023 16:14
@drizuid drizuid changed the title allow case insensitive TRUE/true allow case insensitive TRUE/true/True/trUE/etc Oct 14, 2023
@drizuid
Copy link
Member Author

drizuid commented Oct 14, 2023

devbox ~ # LOG_FILE=false
devbox ~ # if [ "${LOG_FILE,,}" = "true" ]; then echo yep; fi
devbox ~ # LOG_FILE=
devbox ~ # if [ "${LOG_FILE,,}" = "true" ]; then echo yep; fi
devbox ~ # LOG_FILE=False
devbox ~ # if [ "${LOG_FILE,,}" = "true" ]; then echo yep; fi
devbox ~ #

@LinuxServer-CI
Copy link
Contributor

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/duckdns/b68625eb-pkg-b68625eb-dev-62273c152f4b43c88b4bd8ea85577bd2214d6e07-pr-65/index.html
https://ci-tests.linuxserver.io/lspipepr/duckdns/b68625eb-pkg-b68625eb-dev-62273c152f4b43c88b4bd8ea85577bd2214d6e07-pr-65/shellcheck-result.xml

Tag Passed
amd64-b68625eb-pkg-b68625eb-dev-62273c152f4b43c88b4bd8ea85577bd2214d6e07-pr-65
arm64v8-b68625eb-pkg-b68625eb-dev-62273c152f4b43c88b4bd8ea85577bd2214d6e07-pr-65

@drizuid drizuid merged commit 17d2cc1 into master Oct 14, 2023
6 checks passed
@drizuid drizuid deleted the drizuid-patch-1 branch October 14, 2023 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants