diff --git a/bin/zcli-login.expect b/bin/zcli-login.expect deleted file mode 100644 index 8de44d11c..000000000 --- a/bin/zcli-login.expect +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/expect -f - -set timeout -1 - -set subdomain [lindex $argv 0] -set email [lindex $argv 1] -set token [lindex $argv 2] - -spawn zcli login -i - -expect { - "Subdomain:" { - send "$subdomain\r" - } - timeout { - puts "Error: Timeout while waiting for 'Subdomain:' prompt" - exit 1 - } -} - -expect { - "Email:" { - send "$email\r" - } - timeout { - puts "Error: Timeout while waiting for 'Email:' prompt" - exit 1 - } -} - -expect { - "API Token:" { - send "$token\r" - } - timeout { - puts "Error: Timeout while waiting for 'API Token:' prompt" - exit 1 - } -} - -expect { - "Successfully logged in." { - puts "ZCLI login completed successfully." - } - "Failed to log in to your account:" { - puts "Error: Failed to log in. Check credentials or subdomain." - exit 1 - } - timeout { - puts "Error: Timeout while waiting for 'Successfully logged in.' confirmation" - exit 1 - } -} - -expect eof