summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Vatamaniuc <vatamane@gmail.com>2021-08-20 11:24:24 -0400
committerNick Vatamaniuc <nickva@users.noreply.github.com>2021-08-20 12:19:01 -0400
commit1b8d4b73bc9ea67bfe0df5a41e24ea864f4c846d (patch)
treee99b7c2a5f0666c51b10836f1dd6036db95999d2
parent33a66ddd46be1e8671eed05500a78823445cac67 (diff)
downloadcouchdb-1b8d4b73bc9ea67bfe0df5a41e24ea864f4c846d.tar.gz
Fix fauxton_root templating in bin/couchdb script
Rebar mustache templating engine has a bug when handling the }}} brackets in a case like {...{{var}}}. So we work around the issue by using a separate variable. This is an alternate fix for issue: https://github.com/apache/couchdb/pull/3617
-rwxr-xr-xrel/files/couchdb.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/rel/files/couchdb.in b/rel/files/couchdb.in
index 4e142b39d..3ebb2e4ee 100755
--- a/rel/files/couchdb.in
+++ b/rel/files/couchdb.in
@@ -38,7 +38,9 @@ export PROGNAME=`echo $0 | sed 's/.*\///'`
export COUCHDB_QUERY_SERVER_JAVASCRIPT="${COUCHDB_QUERY_SERVER_JAVASCRIPT:-{{prefix}}/bin/couchjs {{prefix}}/share/server/main.js}"
export COUCHDB_QUERY_SERVER_COFFEESCRIPT="${COUCHDB_QUERY_SERVER_COFFEESCRIPT:-{{prefix}}/bin/couchjs {{prefix}}/share/server/main-coffee.js}"
-export COUCHDB_FAUXTON_DOCROOT="${COUCHDB_FAUXTON_DOCROOT:-{{fauxton_root}} }"
+# Use a separate var to work around rebar's mustache template bug
+DEFAULT_FAUXTON_ROOT={{fauxton_root}}
+export COUCHDB_FAUXTON_DOCROOT="${COUCHDB_FAUXTON_DOCROOT:-${DEFAULT_FAUXTON_ROOT}}"
ARGS_FILE="${COUCHDB_ARGS_FILE:-$ROOTDIR/etc/vm.args}"
[ -n "${COUCHDB_INI_FILES:-}" ] && INI_ARGS="-couch_ini $COUCHDB_INI_FILES"