You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2021/08/20 15:29:15 UTC

[couchdb] 01/01: Fix fauxton_root templating in bin/couchdb script

This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a commit to branch fix-fauxton-docroot-3.x
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit f39a966e05c759bcb7bd9b1e8456690074a63e9f
Author: Nick Vatamaniuc <va...@gmail.com>
AuthorDate: Fri Aug 20 11:24:24 2021 -0400

    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
---
 rel/files/couchdb.in | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/rel/files/couchdb.in b/rel/files/couchdb.in
index 4e142b3..3ebb2e4 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"