mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-21 15:54:22 +01:00
(feature) is the ES_JAVA_OPTS var exists, append to it instead of adding a new one
This commit is contained in:
parent
cf40df058e
commit
0b074baef5
@ -15,7 +15,13 @@ config() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
add_var() {
|
add_var() {
|
||||||
yq eval ".services.$SERVICE.environment += \"ES_JAVA_OPTS=-Dlog4j2.formatMsgNoLookups=true\"" docker-compose.yml
|
HAS_OPTS="$(yq eval ".services.$SERVICE.environment | .[] | select(. == \"ES_JAVA_OPTS*\")" docker-compose.yml)"
|
||||||
|
if [ -z "$HAS_OPTS" ]; then
|
||||||
|
yq -i eval ".services.$SERVICE.environment += \"ES_JAVA_OPTS=-Dlog4j2.formatMsgNoLookups=true\"" docker-compose.yml
|
||||||
|
else
|
||||||
|
yq -i eval "(.services.$SERVICE.environment | .[] | select(. == \"ES_JAVA_OPTS*\")) += \" -Dlog4j2.formatMsgNoLookups=true\"" docker-compose.yml
|
||||||
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
proceed()
|
proceed()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user