fix(skills): make PNG weather example Windows-safe

This commit is contained in:
Xubin Ren
2026-08-12 02:48:03 +09:00
parent b14ac4c401
commit 72d3ce6b23
2 changed files with 4 additions and 1 deletions
+2 -1
View File
@@ -51,7 +51,8 @@ Tips:
- Airport codes: `wttr.in/JFK` - Airport codes: `wttr.in/JFK`
- Units: `?m` (metric) `?u` (USCS) - Units: `?m` (metric) `?u` (USCS)
- Today only: `?1` · Current only: `?0` - Today only: `?1` · Current only: `?0`
- PNG: `curl -s "wttr.in/Berlin.png" -o /tmp/weather.png` - PNG (macOS/Linux): `curl -s "https://wttr.in/Berlin.png" -o weather.png`
- PNG (Windows PowerShell): `curl.exe -s "https://wttr.in/Berlin.png" -o weather.png`
## Open-Meteo (fallback, JSON) ## Open-Meteo (fallback, JSON)
@@ -8,6 +8,8 @@ def test_weather_skill_uses_windows_safe_single_today_request() -> None:
assert "On Windows PowerShell, use `curl.exe`" in normalized assert "On Windows PowerShell, use `curl.exe`" in normalized
assert "bare `curl` may resolve to `Invoke-WebRequest`" in normalized assert "bare `curl` may resolve to `Invoke-WebRequest`" in normalized
assert "https://wttr.in/London?1&m" in content assert "https://wttr.in/London?1&m" in content
assert 'curl.exe -s "https://wttr.in/Berlin.png" -o weather.png' in content
assert "/tmp/weather.png" not in content
assert ( assert (
"Do not fetch current conditions separately when a today or forecast " "Do not fetch current conditions separately when a today or forecast "
"request already includes them." "request already includes them."