From 7a499e8e4212f708ad61be9e20455bc57bdcc0a5 Mon Sep 17 00:00:00 2001 From: developomp Date: Tue, 15 Mar 2022 10:54:04 +0900 Subject: [PATCH] added post install task printing --- src/interface/choose_action.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/interface/choose_action.py b/src/interface/choose_action.py index 184e0d6..9ae9e83 100644 --- a/src/interface/choose_action.py +++ b/src/interface/choose_action.py @@ -18,8 +18,19 @@ def choose_action(): ] ) + post_install_tasks = [] for action_name in response["actions"]: module = import_file(action_name, f"src/setup/{action_name}") - # todo: deal with module.post_install + + if hasattr(module, "post_install"): + if isinstance(module.post_install, str): + post_install_tasks.append(module.post_install) + else: + post_install_tasks += module.post_install + log(f"Setting up: {module.name} ({action_name})") module.setup() + + print("POST INStALL TASKS:") + for post_install_task in post_install_tasks: + print(f"- {post_install_task}")