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

vatamane pushed a commit to branch 3.3.x-pending-changes-3.3.3
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit f233f7c41e224c4e22da5f6b7c1d0a6fe4eb90d8
Author: WenHong.Tan <teles...@users.noreply.github.com>
AuthorDate: Thu Sep 28 14:47:59 2023 +0000

    remsh extract wrong NODE name from ERL_FLAGS
---
 rel/overlay/bin/remsh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rel/overlay/bin/remsh b/rel/overlay/bin/remsh
index 1804336b5..49fd1399b 100755
--- a/rel/overlay/bin/remsh
+++ b/rel/overlay/bin/remsh
@@ -39,7 +39,7 @@ ARGS_FILE="${COUCHDB_ARGS_FILE:-$ROOTDIR/etc/vm.args}"
 
 # If present, extract cookie from ERL_FLAGS
 # This is used by the CouchDB Dockerfile and Helm chart
-NODE=$(echo "$ERL_FLAGS" | sed 's/^.*name \([^ ][^ ]*\).*$/\1/g')
+NODE=$(echo "$ERL_FLAGS" | sed -n 's/^.*name \([^ ][^ ]*\).*$/\1/p')
 if test -f "$ARGS_FILE"; then
 # else attempt to extract from vm.args
   ARGS_FILE_COOKIE=$(awk '$1=="-name"{print $2}' "$ARGS_FILE")

Reply via email to