imbajin commented on code in PR #3355:
URL: https://github.com/apache/hugegraph/pull/3355#discussion_r4302779277


##########
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:
   ⚠️ Important: On Darwin systems using the stock BSD `sed`, the `/` delimiter 
in this substitution is parsed before the bracket expression closes, so the 
command returns `unbalanced brackets`. With `set -e`, the unconditional 
`set_property "$CONF" "schema.sync_deletion"` call exits before server startup. 
Please escape `/` or use another delimiter and cover the BSD `sed` case. 
Evidence: the exact expression exits 1 on the local Darwin system; the 
current-head macOS Actions job passed, so this is specific to `sed` 
implementations with this parsing behavior.



-- 
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]

Reply via email to