bitflicker64 opened a new pull request, #3005:
URL: https://github.com/apache/hugegraph/pull/3005

   ## Purpose of the PR
   - close #3004 
   
   `check_port()` in `util.sh` uses `awk -F':' '{print $3}'` to extract the 
port, which assumes a 3-part URL like `http://host:port`. Since #2944 changed 
the default `restserver.url` to `host:port` format (no scheme), field `$3` is 
empty and `lsof -i :` fails with:
   
   ```
   lsof: unacceptable port specification in: -i :
   ```
   
   ## Main Changes
   
   Replace `awk` with `sed` in `check_port()` across all three `util.sh` files:
   
   ```bash
   # before
   local port=$(echo "$1" | awk -F':' '{print $3}')
   
   # after  
   local port=$(echo "$1" | sed 's|.*:||' | sed 's|/.*||')
   ```
   
   This handles all URL formats correctly — `host:port`, `http://host:port`, 
`http://host:port/path`, and IPv6. Also modernizes backtick syntax to `$()` in 
pd and store.
   
   ## Verifying these changes
   - [x] Trivial rework / code cleanup without any test coverage. (No Need)
   
   ## Does this PR potentially affect the following parts?
   - [x] Nope
   
   ## Documentation Status
   - [x] `Doc - No Need`


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