Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Commit ad8bb03

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/website/qs-6.14.1
2 parents 62fc030 + 5de27a6 commit ad8bb03

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

taskweaver/utils/app_utils.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import json
12
from os import listdir, path
23
from typing import Optional, Tuple
34

@@ -13,7 +14,14 @@ def validate_app_config(workspace: str) -> bool:
1314
config_path = path.join(workspace, "taskweaver_config.json")
1415
if not path.exists(config_path):
1516
return False
16-
# TODO: read, parse and validate config
17+
try:
18+
with open(config_path, "r", encoding="utf-8") as f:
19+
data = json.load(f)
20+
# Config must be a dictionary (key-value pairs)
21+
if not isinstance(data, dict):
22+
return False
23+
except (json.JSONDecodeError, OSError):
24+
return False
1725
return True
1826

1927
def is_dir_valid(dir: str) -> bool:

0 commit comments

Comments
 (0)