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

WEB2PY_MIN branch will never execute #5

Open
wolfmanstout opened this issue Sep 22, 2024 · 1 comment · May be fixed by #6
Open

WEB2PY_MIN branch will never execute #5

wolfmanstout opened this issue Sep 22, 2024 · 1 comment · May be fixed by #6

Comments

@wolfmanstout
Copy link

The following lines look like an attempt to have the WEB2PY_MIN branch execute by default:

OZtree-docker/Dockerfile

Lines 35 to 36 in 252f6ad

ENV WEB2PY_MIN=1
RUN if [ "${WEB2PY_MIN}" == true ]; then \

This Bash syntax is a string comparison, so "1" won't be equal to "true". Looking at other usages of WEB2PY_MIN, this is the only instance where it is set to a number, so the simplest would be to change to ENV WEB2PY_MIN=true.

Alternatively, if a numeric flag is preferred, you could use the following Bash syntax:
if (( WEB2PY_MIN )); then

You would also need to change all instances of this variable to 0 or 1.

Background: https://mywiki.wooledge.org/BashSheet#Testing

@hyanwong
Copy link
Member

Ah, thanks for spotting and suggesting a fix. Your fix sounds great.

hyanwong added a commit that referenced this issue Sep 23, 2024
@hyanwong hyanwong linked a pull request Sep 23, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants