OneZoom / OZtree-docker

A set of scripts that generate a fully functional docker image of the OneZoom software
Other
3 stars 1 forks source link

WEB2PY_MIN branch will never execute #5

Open wolfmanstout opened 1 month ago

wolfmanstout commented 1 month ago

The following lines look like an attempt to have the WEB2PY_MIN branch execute by default: https://github.com/OneZoom/OZtree-docker/blob/252f6ad23ac139584707c0485f7ee2edaaf4f0bf/Dockerfile#L35-L36

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 commented 1 month ago

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