Skip to content

Commit 4c40e36

Browse files
committed
bug: test without config file
1 parent 502b87c commit 4c40e36

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ license = "MIT"
88
packages = [{include = "recorder"}]
99

1010
[tool.poetry.scripts]
11-
recorder = "recorder.__main__:app"
11+
recorder = "recorder.__main__:main"
1212

1313
[tool.poetry.dependencies]
1414
python = "^3.8"

recorder/__main__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,10 @@ def get_config(path: Path = DEFAULT_CONFIG_PATH) -> dict:
147147
try:
148148
return Config.from_yaml(path)
149149
except AttributeError:
150-
typer_warn(f"No configuration found in {path}. Generate one.")
151-
return Config.from_yaml(path)
150+
raise RuntimeError(
151+
f"No configuration found in {path}. Generate one with the "
152+
"`config` command."
153+
)
152154

153155

154156
@app.command(help="Record data from the configured devices")

0 commit comments

Comments
 (0)