Skip to content

Commit

Permalink
fix CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
Remi-Gau committed Sep 29, 2024
1 parent a9f99dd commit fad2fdb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/cat12/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
import os

MCR_VERSION = os.getenv("MCR_VERSION")
CAT_VERSION = " ".join(os.getenv("CAT_VERSION")[1:10].split("_"))
if MCR_VERSION is None:
MCR_VERSION = "2017b"

tmp = os.getenv("CAT_VERSION")
if tmp is None:
tmp = f".8.1_r2042_R${MCR_VERSION}"
CAT_VERSION = " ".join(tmp[1:10].split("_"))


def log_levels() -> list[str]:
Expand Down
7 changes: 5 additions & 2 deletions src/cat12/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
list_subjects,
)
from cat12.cat_logging import cat12_log
from cat12.defaults import log_levels
from cat12.defaults import CAT_VERSION, log_levels
from cat12.methods import generate_method_section
from cat12.utils import progress_bar

Expand All @@ -34,7 +34,10 @@
EXIT_CODES = json.load(f)

# Get environment variable
STANDALONE = Path(os.getenv("STANDALONE"))
STANDALONE = os.getenv("STANDALONE")
if STANDALONE is None:
STANDALONE = f"/opt/CAT12${CAT_VERSION}/standalone"
STANDALONE = Path(STANDALONE)

logger = cat12_log(name="cat12")

Expand Down

0 comments on commit fad2fdb

Please sign in to comment.