Handle diff nonzero return in set_eula
- Suppress nonzero return code from diff - Remove false fix `return 0`
This commit is contained in:
parent
c4e3fc042c
commit
695fae915b
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -eux
|
||||
|
||||
# Set eula value in eula.txt
|
||||
set_eula() {
|
||||
@ -7,9 +7,8 @@ set_eula() {
|
||||
EULA="${1:-false}"
|
||||
EULAFILE="${EULAFILE:-/app/eula.txt}"
|
||||
sed -i.bak "s/^eula=.*\$/eula=${EULA:-false}/" "$EULAFILE"
|
||||
diff --unified=1 "${EULAFILE}.bak" "$EULAFILE"
|
||||
diff --unified=1 "${EULAFILE}.bak" "$EULAFILE" || true
|
||||
rm "${EULAFILE}.bak"
|
||||
return 0
|
||||
}
|
||||
|
||||
# Update server.properties using env
|
||||
|
Loading…
Reference in New Issue
Block a user