fix: remove duplicate warning message for unsupported Claude Code version

Fixes #359

The warning about unsupported Claude Code version was being output twice:
once via logger.warning() and again via print() to stderr. This caused
duplicate messages in the console.

Changes:
- Removed the redundant print() statement
- Kept logger.warning() as the single source of the warning
- Removed unused sys import (automatically cleaned by ruff)

🤖 Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
majiayu000 2025-12-10 22:24:15 +08:00
parent 53482d8955
commit 1c2ed69b2e

View file

@ -6,7 +6,6 @@ import os
import platform
import re
import shutil
import sys
import tempfile
from collections.abc import AsyncIterable, AsyncIterator
from contextlib import suppress
@ -657,7 +656,6 @@ class SubprocessCLITransport(Transport):
"Some features may not work correctly."
)
logger.warning(warning)
print(warning, file=sys.stderr)
except Exception:
pass
finally: