Spaces:
Running
Running
Jeremiah Lowin commited on
Commit ·
ad568fb
1
Parent(s): 7aac587
Update cli.py
Browse files- src/fastmcp/cli/cli.py +1 -5
src/fastmcp/cli/cli.py
CHANGED
|
@@ -180,17 +180,13 @@ def _import_server(file: Path, server_object: str | None = None):
|
|
| 180 |
def version(ctx: Context):
|
| 181 |
if ctx.resilient_parsing:
|
| 182 |
return
|
| 183 |
-
try:
|
| 184 |
-
fastmcp_path = f"~/{Path(__file__).resolve().parents[3].relative_to(Path.home())}"
|
| 185 |
-
except ValueError:
|
| 186 |
-
fastmcp_path = str(Path(__file__).resolve().parents[3])
|
| 187 |
|
| 188 |
info = {
|
| 189 |
"FastMCP version": fastmcp.__version__,
|
| 190 |
"MCP version": importlib.metadata.version("mcp"),
|
| 191 |
"Python version": platform.python_version(),
|
| 192 |
"Platform": platform.platform(),
|
| 193 |
-
"FastMCP root path":
|
| 194 |
}
|
| 195 |
|
| 196 |
g = Table.grid(padding=(0, 1))
|
|
|
|
| 180 |
def version(ctx: Context):
|
| 181 |
if ctx.resilient_parsing:
|
| 182 |
return
|
|
|
|
|
|
|
|
|
|
|
|
|
| 183 |
|
| 184 |
info = {
|
| 185 |
"FastMCP version": fastmcp.__version__,
|
| 186 |
"MCP version": importlib.metadata.version("mcp"),
|
| 187 |
"Python version": platform.python_version(),
|
| 188 |
"Platform": platform.platform(),
|
| 189 |
+
"FastMCP root path": Path(fastmcp.__file__).resolve().parents[1],
|
| 190 |
}
|
| 191 |
|
| 192 |
g = Table.grid(padding=(0, 1))
|