Skip to content

Commit 1a9aa48

Browse files
fix cli crush
Signed-off-by: min.tian <min.tian.cn@gmail.com>
1 parent 05203c0 commit 1a9aa48

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

vectordb_bench/cli/cli.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@
4040

4141
def click_get_defaults_from_file(ctx, param, value): # noqa: ANN001, ARG001
4242
if value:
43-
input_file = value if Path.exists(value) else Path.join(config.CONFIG_LOCAL_DIR, value)
43+
path = Path(value)
44+
input_file = path if path.exists() else Path(config.CONFIG_LOCAL_DIR, path)
4445
try:
45-
with Path.open(input_file) as f:
46+
with input_file.open() as f:
4647
_config: dict[str, dict[str, Any]] = load(f.read(), Loader=Loader) # noqa: S506
4748
ctx.default_map = _config.get(ctx.command.name, {})
4849
except Exception as e:

0 commit comments

Comments
 (0)