Fix V result redefinition and Crystal nil type error

- V: Rename result variables in cmd_key to avoid redefinition (xdg_result, mac_result, win_result)
- Crystal: Fix Bool | Nil type by explicitly checking stdout.nil? before string check

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Russell Ballestrini 2026-01-06 10:04:06 -05:00
parent 9329d9365f
commit a46bf88a3e
2 changed files with 8 additions and 7 deletions

View file

@ -107,7 +107,8 @@ else
response = HTTP::Client.post(url, headers: headers, body: body)
result = JSON.parse(response.body)
api_works = result["stdout"]? && result["stdout"].as_s.includes?("Hello from test")
stdout = result["stdout"]?
api_works = !stdout.nil? && stdout.as_s.includes?("Hello from test")
print_test("API endpoint reachable and functional", api_works)
rescue ex
print_test("API endpoint reachable and functional", false)