Skip to content

Commit

Permalink
safer comparison of MODE env var
Browse files Browse the repository at this point in the history
fixes mu-semtech#22 

As mentioned there  in the current setup one would still have the sh parser trip over a use case like
```
export MODE="my mode"
./start.sh: line 4: [: too many arguments
```
  • Loading branch information
nvdk authored Nov 18, 2024
1 parent 01a4f43 commit 45de869
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion start.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/env bash
set -eu
if [ ${MODE:-""} == "development" ]; then
if [ "${MODE}" == "development" ]; then
if [ -f /app/requirements.txt ]; then pip install -r /app/requirements.txt; fi
exec python web.py
else
Expand Down

0 comments on commit 45de869

Please sign in to comment.