summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Vatamaniuc <vatamane@gmail.com>2021-08-20 11:24:24 -0400
committerNick Vatamaniuc <vatamane@gmail.com>2021-08-20 11:24:24 -0400
commitf39a966e05c759bcb7bd9b1e8456690074a63e9f (patch)
treee99b7c2a5f0666c51b10836f1dd6036db95999d2
parent33a66ddd46be1e8671eed05500a78823445cac67 (diff)
downloadcouchdb-fix-fauxton-docroot-3.x.tar.gz
Fix fauxton_root templating in bin/couchdb scriptfix-fauxton-docroot-3.x
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"