fix(updater): harden forced startup updates
This commit is contained in:
1 parent
55d38c46ec
commit
b61f766ea6
7 files changed
+270
-12
No files matched your search
+4
-2
@@ -10,6 +10,10 @@ _BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
if _BASE_DIR not in sys.path:
|
||||
sys.path.insert(0, _BASE_DIR)
|
||||
|
||||
from douyin.updater.bootstrap import run_startup_update_check_early
|
||||
|
||||
run_startup_update_check_early(app_name="run_cli")
|
||||
|
||||
# 可选:全局参数/调用跟踪(仅在环境变量 PARAM_TRACK_ALL=1 时启用)
|
||||
if os.environ.get("PARAM_TRACK_ALL") == "1":
|
||||
try:
|
||||
@@ -99,7 +103,6 @@ os.environ.setdefault("OMP_NUM_THREADS", "1")
|
||||
|
||||
from douyin.core.douyin_fudai import fudai_analyse
|
||||
from douyin.license.license_manager import require_license_or_exit
|
||||
from douyin.updater.force_update import run_startup_update_check
|
||||
|
||||
|
||||
def ensure_adb_in_path() -> None:
|
||||
@@ -341,7 +344,6 @@ def parse_args(argv: list[str]) -> argparse.Namespace:
|
||||
|
||||
|
||||
def main(argv: list[str]) -> int:
|
||||
run_startup_update_check(app_name="run_cli")
|
||||
require_license_or_exit()
|
||||
ensure_adb_in_path()
|
||||
args = parse_args(argv)
|
||||
|
||||
Reference in new issue
Block a user