diff --git a/spcd/shell.py b/spcd/shell.py index f9f9b33..f0c7f8c 100644 --- a/spcd/shell.py +++ b/spcd/shell.py @@ -3,3 +3,8 @@ import importlib env = importlib.import_module("env") + +try: + step = int(env.SPCD_STEP) +except AttributeError: + step = 1 diff --git a/spcd/util.py b/spcd/util.py index a77691a..76cb0f0 100644 --- a/spcd/util.py +++ b/spcd/util.py @@ -7,7 +7,7 @@ from urllib.parse import urlparse, urlunparse from rwx import fs from rwx.log import stream as log -from spcd.shell import env +from spcd import env, shell def add_url_path(url: str, extra_path: str) -> str: @@ -57,7 +57,7 @@ def split() -> None: def step(text: str) -> None: """Increment the step number of the current build process.""" - env.SPCD_STEP += 1 + shell.step += 1 log.info(env.SPCD_DOWN) - log.info(f"{env.SPCD_VERT} {env.SPCD_STEP} {text}") + log.info(f"{env.SPCD_VERT} {shell.step} {text}") log.info(env.SPCD___UP)