mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-20 01:11:18 +00:00
refactor: add OAuth timeout and remove unused color variables
- Add --max-time 30 to OAuth key exchange curl to prevent indefinite hangs - Remove unused DIM variable from cli/install.sh - Remove unused BLUE variable from cli/spawn.sh Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
fe6674717b
commit
36b3d82d2e
3 changed files with 1 additions and 3 deletions
|
|
@ -19,7 +19,6 @@ RED='\033[0;31m'
|
|||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
BOLD='\033[1m'
|
||||
DIM='\033[2m'
|
||||
NC='\033[0m'
|
||||
|
||||
log_info() { echo -e "${GREEN}[spawn]${NC} $1"; }
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ SPAWN_CACHE_TTL=3600 # 1 hour in seconds
|
|||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
BLUE='\033[0;34m'
|
||||
BOLD='\033[1m'
|
||||
DIM='\033[2m'
|
||||
NC='\033[0m'
|
||||
|
|
|
|||
|
|
@ -418,7 +418,7 @@ exchange_oauth_code() {
|
|||
local oauth_code="${1}"
|
||||
|
||||
local key_response
|
||||
key_response=$(curl -s -X POST "https://openrouter.ai/api/v1/auth/keys" \
|
||||
key_response=$(curl -s --max-time 30 -X POST "https://openrouter.ai/api/v1/auth/keys" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"code\": \"${oauth_code}\"}")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue