Skip to content

Commit a53283f

Browse files
authored
fix: correctly launch CLI (#43)
Correctly launches the CLI script from the `sqlspec` command.
1 parent 5cf92b0 commit a53283f

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ test = [
109109
]
110110

111111
[project.scripts]
112-
sqlspec = "sqlspec.cli:run_cli"
112+
sqlspec = "sqlspec.__main__:run_cli"
113113

114114
[build-system]
115115
build-backend = "hatchling.build"

sqlspec/__main__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from sqlspec.cli import add_migration_commands as build_cli_interface
2+
3+
__all__ = ("run_cli", )
4+
5+
6+
def run_cli() -> None: # pragma: no cover
7+
"""SQLSpec CLI"""
8+
build_cli_interface()()
9+
10+
11+
if __name__ == "__main__": # pragma: no cover
12+
run_cli()

0 commit comments

Comments
 (0)