diff options
| author | 2024-03-28 19:52:33 +0800 | |
|---|---|---|
| committer | 2024-03-28 19:52:33 +0800 | |
| commit | e742eed494cc6594bd21e5e6eabd3ffe8b181339 (patch) | |
| tree | 5a0958b3c47814dbf5a658256cf1d14cdcba6b13 /src | |
| parent | 81b380b04b9e713223106f16951320ef4aa03373 (diff) | |
| download | ipm-e742eed494cc6594bd21e5e6eabd3ffe8b181339.tar.gz ipm-e742eed494cc6594bd21e5e6eabd3ffe8b181339.zip | |
fix(cli): fix update without echo given
Diffstat (limited to 'src')
| -rw-r--r-- | src/ipm/api.py | 6 | ||||
| -rw-r--r-- | src/ipm/const.py | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/ipm/api.py b/src/ipm/api.py index 8c3045a..1214f6c 100644 --- a/src/ipm/api.py +++ b/src/ipm/api.py @@ -55,7 +55,7 @@ def lock(target_path: StrPath, echo: bool = False) -> bool: def check(target_path: StrPath, echo: bool = False) -> bool: info("检查项目环境...", echo) - update("检查基础环境中...") + update("检查基础环境中...", echo) if not (toml_path := Path(target_path).joinpath("infini.toml")).exists(): raise FileNotFoundError( f"文件 [green]infini.toml[/green] 尚未被初始化, 你可以使用[bold green]`ipm init`[/bold green]来初始化项目." @@ -66,12 +66,12 @@ def check(target_path: StrPath, echo: bool = False) -> bool: update("同步世界树中...", echo) global_lock = PackageLock() for index in project.yggdrasils.values(): - update(f"同步世界树: {index}...") + update(f"同步世界树: [green]{index}[/]...", echo) if not (yggdrasil := global_lock.get_yggdrasil_by_index(index)): Yggdrasil.init(index) else: yggdrasil.sync() - success("世界树同步完毕.", echo) + success(f"世界树 [green]{index}[/] 同步完毕.", echo) if not lock(target_path, echo=echo): return False diff --git a/src/ipm/const.py b/src/ipm/const.py index 00e5d58..1332143 100644 --- a/src/ipm/const.py +++ b/src/ipm/const.py @@ -4,7 +4,8 @@ from pathlib import Path DEBUG = False # 初始化参数 -INDEX = "https://ipm.hydroroll.team/index/" +# INDEX = "http://localhost:5173/" +INDEX = "https://yggdrasil.noctisynth.org/" IPM_PATH = Path.home() / ".ipm" SRC_HOME = IPM_PATH / "src" STORAGE = IPM_PATH / "storage" |
