From 36c1a5a5923bab5db426b62f06ff1131f67a2dcd Mon Sep 17 00:00:00 2001 From: xxchan Date: Sat, 27 Apr 2024 16:29:06 +0800 Subject: [PATCH] fix(risedev): don't kill tmux session unnecessarily Signed-off-by: xxchan --- Makefile.toml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Makefile.toml b/Makefile.toml index 84f9daab52ecf..c188ec9b5326b 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -720,13 +720,13 @@ if ! ${TMUX} ls &>/dev/null ; then exit 0 fi -# Kill other components +# Kill other components with Ctrl+C/Ctrl+D ${TMUX} list-windows -F "#{window_name} #{pane_id}" \ -| grep -v 'kafka' \ -| grep -v 'zookeeper' \ +| grep --invert-match --extended-regexp '(kafka|zookeeper)' \ | awk '{ print $2 }' \ | xargs -I {} ${TMUX} send-keys -t {} C-c C-d +# Kill kafka cleanly. Ctrl+C will lose data. if [[ -n $(${TMUX} list-windows | grep kafka) ]]; then echo "kill kafka" @@ -734,9 +734,6 @@ then echo "kill zookeeper" kill_zookeeper || true - - # Kill their ${TMUX} sessions - ${TMUX} list-windows -t risedev -F "#{pane_id}" | xargs -I {} ${TMUX} send-keys -t {} C-c C-d fi ${TMUX} kill-server