-
-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathcheck.py
More file actions
18 lines (15 loc) · 606 Bytes
/
Copy pathcheck.py
File metadata and controls
18 lines (15 loc) · 606 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import sys
from pathlib import Path
from vectorcode.cli_utils import CHECK_OPTIONS, Config, find_project_config_dir
async def check(configs: Config) -> int:
assert isinstance(configs.check_item, str)
assert configs.check_item.lower() in CHECK_OPTIONS
match configs.check_item:
case "config":
project_local_config = await find_project_config_dir(".")
if project_local_config is None:
print("Failed!", file=sys.stderr)
return 1
else:
print(str(Path(project_local_config).parent), end="")
return 0