Skip to content

Commit 3819964

Browse files
fix(ci): make revenueholdings_license import optional (fixes CI failures)
1 parent 8a2e5c9 commit 3819964

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

src/json2sql/cli.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66

77
import typer
88

9-
from revenueholdings_license import require_license
9+
try:
10+
from revenueholdings_license import require_license
11+
except ImportError:
12+
require_license = None
1013

1114
from .converter import JSONToSQLConverter
1215
from .dialects import Dialect
@@ -56,7 +59,8 @@ def convert(
5659
),
5760
):
5861
"""Convert a JSON file to SQL INSERT statements."""
59-
require_license("json2sql")
62+
if require_license:
63+
require_license("json2sql")
6064
# Read input
6165
if input_file:
6266
json_text = input_file.read_text(encoding="utf-8")
@@ -92,15 +96,17 @@ def mcp():
9296
AI coding agents (Claude Code, Cursor, etc.) use this to interact
9397
with json2sql tools directly.
9498
"""
95-
require_license("json2sql")
99+
if require_license:
100+
require_license("json2sql")
96101
from click_to_mcp import run
97102
run(app)
98103

99104

100105
@app.command()
101106
def version():
102107
"""Show version."""
103-
require_license("json2sql")
108+
if require_license:
109+
require_license("json2sql")
104110
from . import __version__
105111
typer.echo(f"json2sql {__version__}")
106112

0 commit comments

Comments
 (0)