File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -24812,10 +24812,9 @@ playground_topic_create_command() {
2481224812 get_security_broker "--command-config"
2481324813 get_environment_used
2481424814
24815- playground topic get-number-records --topic $topic > /tmp/result.log 2>/tmp/result.log
2481624815 set +e
24817- grep "does not exist" /tmp/result.log > /dev/null 2>&1
24818- if [ $? == 0 ]
24816+ existing_topics=$(playground get-topic-list)
24817+ if ! echo "$existing_topics" | grep -qFw "$topic"
2481924818 then
2482024819 set -e
2482124820 log "🆕 Creating topic $topic"
Original file line number Diff line number Diff line change @@ -5,10 +5,9 @@ verbose="${args[--verbose]}"
55get_security_broker " --command-config"
66get_environment_used
77
8- playground topic get-number-records --topic $topic > /tmp/result.log 2> /tmp/result.log
98set +e
10- grep " does not exist " /tmp/result.log > /dev/null 2>&1
11- if [ $? == 0 ]
9+ existing_topics= $( playground get-topic-list )
10+ if ! echo " $existing_topics " | grep -qFw " $topic "
1211then
1312 set -e
1413 log " 🆕 Creating topic $topic "
You can’t perform that action at this time.
0 commit comments