fix(cloudns): fix grep when record start with hyphen symbol

This commit is contained in:
imlonghao committed 2023-03-28 22:49:39 +08:00
1 parent 97f87c4229
commit 7ef2533b98
1 file changed
+1 -1
+1 -1
View File
@@ -78,7 +78,7 @@ dns_cloudns_rm() {
return 1
fi
for i in $(echo "$response" | tr '{' "\n" | grep "$record"); do
for i in $(echo "$response" | tr '{' "\n" | grep -- "$record"); do
record_id=$(echo "$i" | tr ',' "\n" | grep -E '^"id"' | sed -re 's/^\"id\"\:\"([0-9]+)\"$/\1/g')
if [ -n "$record_id" ]; then
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.