qqbot-cli 1.0.0__tar.gz → 1.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {qqbot_cli-1.0.0 → qqbot_cli-1.0.1}/PKG-INFO +1 -1
- {qqbot_cli-1.0.0 → qqbot_cli-1.0.1}/pyproject.toml +1 -1
- {qqbot_cli-1.0.0 → qqbot_cli-1.0.1}/qqbot_cli/__init__.py +1 -1
- {qqbot_cli-1.0.0 → qqbot_cli-1.0.1}/qqbot_cli/cli.py +20 -1
- {qqbot_cli-1.0.0 → qqbot_cli-1.0.1}/LICENSE +0 -0
- {qqbot_cli-1.0.0 → qqbot_cli-1.0.1}/MANIFEST.in +0 -0
- {qqbot_cli-1.0.0 → qqbot_cli-1.0.1}/PACKAGING.md +0 -0
- {qqbot_cli-1.0.0 → qqbot_cli-1.0.1}/README.md +0 -0
- {qqbot_cli-1.0.0 → qqbot_cli-1.0.1}/qqbot_cli/fetch.py +0 -0
- {qqbot_cli-1.0.0 → qqbot_cli-1.0.1}/qqbot_cli/paths.py +0 -0
- {qqbot_cli-1.0.0 → qqbot_cli-1.0.1}/qqbot_cli/py.typed +0 -0
- {qqbot_cli-1.0.0 → qqbot_cli-1.0.1}/qqbot_cli/runner.py +0 -0
- {qqbot_cli-1.0.0 → qqbot_cli-1.0.1}/qqbot_cli/uninstall.py +0 -0
- {qqbot_cli-1.0.0 → qqbot_cli-1.0.1}/qqbot_cli/wizard.py +0 -0
- {qqbot_cli-1.0.0 → qqbot_cli-1.0.1}/qqbot_cli.egg-info/SOURCES.txt +0 -0
- {qqbot_cli-1.0.0 → qqbot_cli-1.0.1}/setup.cfg +0 -0
|
@@ -207,9 +207,21 @@ def do_install(install_dir: str = "", force_wizard: bool = False,
|
|
|
207
207
|
try:
|
|
208
208
|
config = wizard.run_wizard(install_dir, tag, existing)
|
|
209
209
|
except (EOFError, KeyboardInterrupt):
|
|
210
|
+
# 用户中途按了 Ctrl+C / 输入被关掉(管道里跑、CI)。
|
|
211
|
+
# **程序文件已经装好了,必须照常写 marker**,否则 `is_installed()`
|
|
212
|
+
# 判为没装,下次 `qqbot` 会重新下载一遍 —— 白费一次下载和装依赖。
|
|
213
|
+
# 但 config.json 没写成,所以一个劲儿启动也没用,改为提示补配置。
|
|
210
214
|
print()
|
|
215
|
+
runner.write_marker(install_dir, {
|
|
216
|
+
"tag": tag,
|
|
217
|
+
"sha256": result.get("sha256") or "",
|
|
218
|
+
"cli_version": __version__,
|
|
219
|
+
"needs_config": True,
|
|
220
|
+
})
|
|
221
|
+
paths.remember_install_dir(install_dir)
|
|
211
222
|
_info("向导已取消,程序文件已经装好了。")
|
|
212
|
-
_info("
|
|
223
|
+
_info("还没写配置,所以暂时不能直接启动。")
|
|
224
|
+
_info("运行 `qqbot init` 补完配置即可(不会重新下载)。")
|
|
213
225
|
return 0
|
|
214
226
|
wizard.write_config(install_dir, config)
|
|
215
227
|
_ok("已生成 config.json")
|
|
@@ -497,6 +509,13 @@ def main(argv: Optional[List[str]] = None) -> int:
|
|
|
497
509
|
remembered = paths.remembered_install_dir()
|
|
498
510
|
if not dir_given and remembered and runner.is_installed(remembered) \
|
|
499
511
|
and not args.upgrade:
|
|
512
|
+
# 装过但上次向导被取消了(没写 config.json)→ 补配置,而不是启动个空程序
|
|
513
|
+
marker = runner.read_marker(remembered)
|
|
514
|
+
if marker.get("needs_config") and \
|
|
515
|
+
not os.path.exists(os.path.join(remembered, "config.json")):
|
|
516
|
+
_info("上次没写配置,先补一下(不会重新下载)。")
|
|
517
|
+
return do_install(remembered, force_wizard=True,
|
|
518
|
+
upgrade=False, dir_given=True)
|
|
500
519
|
return do_run(remembered)
|
|
501
520
|
return do_install(install_dir, upgrade=args.upgrade, dir_given=dir_given)
|
|
502
521
|
except KeyboardInterrupt:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|