mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-22 05:24:18 +02:00
commit
ef4eaad9b1
1 changed files with 5 additions and 0 deletions
|
|
@ -2,6 +2,7 @@ import abc
|
|||
import contextlib
|
||||
import datetime
|
||||
import os
|
||||
import shutil
|
||||
from collections.abc import AsyncIterator
|
||||
from pathlib import Path
|
||||
from typing import (
|
||||
|
|
@ -341,6 +342,10 @@ class NpxStdioTransport(StdioTransport):
|
|||
env_vars: Additional environment variables
|
||||
use_package_lock: Whether to use package-lock.json (--prefer-offline)
|
||||
"""
|
||||
# verify npx is installed
|
||||
if shutil.which("npx") is None:
|
||||
raise ValueError("Command 'npx' not found")
|
||||
|
||||
# Basic validation
|
||||
if project_directory and not Path(project_directory).exists():
|
||||
raise NotADirectoryError(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue