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

sxnan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-agents-demos.git


The following commit(s) were added to refs/heads/main by this push:
     new 9ec3247  Fix Linux sed usage in Flink setup script (#3)
9ec3247 is described below

commit 9ec324725023198a58fb9fca58d96b4b23e8516c
Author: ursash <[email protected]>
AuthorDate: Mon Mar 30 11:37:50 2026 +0800

    Fix Linux sed usage in Flink setup script (#3)
---
 flink-operations-agent-demo/bin/internal/setup_flink.sh | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/flink-operations-agent-demo/bin/internal/setup_flink.sh 
b/flink-operations-agent-demo/bin/internal/setup_flink.sh
index a5a6509..ff70ca7 100755
--- a/flink-operations-agent-demo/bin/internal/setup_flink.sh
+++ b/flink-operations-agent-demo/bin/internal/setup_flink.sh
@@ -57,7 +57,11 @@ cp $FLINK_HOME/opt/flink-python-1.20.3.jar $FLINK_HOME/lib/
 cp $SCRIPT_DIR/flink_config.yaml $FLINK_HOME/conf/config.yaml
 
 # Automatically set agent.baseLogDir to FLINK_HOME/log
-sed -i '' "s|baseLogDir: EVENT_LOG_DIR_PLACEHOLDER|baseLogDir: 
$FLINK_HOME/log|" $FLINK_HOME/conf/config.yaml
+if [[ "$OSTYPE" == "darwin"* ]]; then
+    sed -i '' "s|baseLogDir: EVENT_LOG_DIR_PLACEHOLDER|baseLogDir: 
$FLINK_HOME/log|" "$FLINK_HOME/conf/config.yaml"
+else
+    sed -i "s|baseLogDir: EVENT_LOG_DIR_PLACEHOLDER|baseLogDir: 
$FLINK_HOME/log|" "$FLINK_HOME/conf/config.yaml"
+fi
 
 # Download Kafka connector (skip if already exists)
 if [ ! -f "$FLINK_HOME/lib/flink-sql-connector-kafka-3.4.0-1.20.jar" ]; then
@@ -104,4 +108,4 @@ echo "  Web UI: http://localhost:8082";
 
 # Start watermark collector in background
 echo "Starting watermark collector..."
-"$SCRIPT_DIR/start_metric_collector.sh" --background
\ No newline at end of file
+"$SCRIPT_DIR/start_metric_collector.sh" --background

Reply via email to