byteayan commented on code in PR #3355:
URL: https://github.com/apache/hugegraph/pull/3355#discussion_r4303929229
##########
hugegraph-server/hugegraph-dist/src/assembly/travis/start-server.sh:
##########
@@ -42,6 +42,19 @@ function sed_in_place() {
esac
}
+# Leave exactly one key=value line: run-api-test.sh starts the same directory
+# more than once, and a key appended twice reaches HugeConfig as a list.
+function set_property() {
+ local file=$1
+ local key=$2
+ local value=$3
+ local pattern
+
+ pattern=$(printf '%s' "$key" | sed 's/[][\.*^$/]/\\&/g')
Review Comment:
Thanks, fixed in 37597c441. `set_property` no longer escapes the key with
sed. The keys it gets are fixed names whose only regex character is `.`, so it
uses `${key//./\\.}`, which leaves no bracket expression for BSD sed to
misparse. The stock sed on my macOS 26 accepted the old expression, so I
couldn't reproduce "unbalanced brackets" locally; the new form has nothing to
misparse. `test-start-server.sh` passes 7/7 on Linux (GNU sed) and on macOS
with `/usr/bin/sed` under both bash 5 and `/bin/bash` 3.2.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]