prevent broken call of delete on bad syntax
This commit is contained in:
1 parent
f477ea7d6b
commit
efa9fee992
1 file changed
+1
-1
+1
-1
@@ -151,7 +151,7 @@ if [[ "$SCRIPT_ACTION" == "l" ]]; then
|
||||
fi
|
||||
|
||||
# Destroy
|
||||
if [[ "$SCRIPT_ACTION" == "d" ]]; then
|
||||
if [[ "$SCRIPT_ACTION" == "d" && -n "$LINODE_LABEL" ]]; then
|
||||
INSTANCE_IP=$(curl -s -H "Authorization: Bearer $LINODE_API_KEY" https://api.linode.com/v4/linode/instances | jq '.data[] | select(.label == "'$LINODE_LABEL'") | .ipv4[]' | sed -e "s/\"//g")
|
||||
INSTANCE_ID=$(curl -s -H "Authorization: Bearer $LINODE_API_KEY" https://api.linode.com/v4/linode/instances | jq '.data[] | select(.label == "'$LINODE_LABEL'") | .id' | sed -e "s/\"//g")
|
||||
echo "Destroying ID:$INSTANCE_ID Hit Ctrl-C in the next 10 seconds to cancel."
|
||||
|
||||
Reference in new issue
Block a user