aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author苏向夜 <fu050409@163.com>2024-01-23 16:03:39 +0800
committer苏向夜 <fu050409@163.com>2024-01-23 16:03:39 +0800
commitc344363fa3ad598c9b84dff280137624bbafe781 (patch)
tree4c788f2d71a63887afc7fa985a2c3420efee2ca9
parent5531f8c8b20a17e4af662c887d2ff531d3bcc429 (diff)
downloadipm-c344363fa3ad598c9b84dff280137624bbafe781.tar.gz
ipm-c344363fa3ad598c9b84dff280137624bbafe781.zip
:sparkles: feat(api): new check command api
-rw-r--r--src/ipm/api.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ipm/api.py b/src/ipm/api.py
index 7e0eda1..513eff9 100644
--- a/src/ipm/api.py
+++ b/src/ipm/api.py
@@ -18,6 +18,12 @@ import toml
import shutil
+def check(source_path: StrPath) -> None:
+ source_path = Path(source_path).resolve()
+ lock = ProjectLock(source_path)
+ lock.init()
+
+
def init(source_path: StrPath, force: bool = False, echo: bool = False) -> None:
source_path = Path(source_path).resolve()
if (toml_path := (source_path / "infini.toml")).exists() and not force: