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 16:19:07 UTC

[couchdb] branch 3.x updated: 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 3.x
in repository https://gitbox.apache.org/repos/asf/couchdb.git


The following commit(s) were added to refs/heads/3.x by this push:
     new 1b8d4b7  Fix fauxton_root templating in bin/couchdb script
1b8d4b7 is described below

commit 1b8d4b73bc9ea67bfe0df5a41e24ea864f4c846d
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"