if completion flag return early to avoid unnecessary VBAN connections

patch bump
This commit is contained in:
onyx-and-iris 2026-02-28 13:34:46 +00:00
parent 5460965945
commit c660778698
3 changed files with 7 additions and 7 deletions

View File

@ -1,6 +1,6 @@
[project]
name = "vban-cli"
version = "0.4.0"
version = "0.4.1"
description = "A command-line interface for Voicemeeter leveraging VBAN."
readme = "README.md"
license = { text = "LICENSE" }

View File

@ -33,17 +33,17 @@ def launcher(
*tokens: Annotated[str, Parameter(show=False, allow_leading_hyphen=True)],
vban_config: Annotated[VBANConfig, Parameter()] = VBANConfig(),
):
command, bound, _ = app.parse_args(tokens)
if tokens[0] == '--install-completion':
return command(*bound.args, **bound.kwargs)
with vban_cmd.api(
vban_config.kind,
ip=vban_config.host,
port=vban_config.port,
streamname=vban_config.streamname,
) as client:
additional_kwargs = {}
command, bound, _ = app.parse_args(tokens)
additional_kwargs['ctx'] = Context(client=client)
return command(*bound.args, **bound.kwargs, **additional_kwargs)
return command(*bound.args, **bound.kwargs, ctx=Context(client=client))
def run():

2
uv.lock generated
View File

@ -124,7 +124,7 @@ wheels = [
[[package]]
name = "vban-cli"
version = "0.4.0"
version = "0.4.1"
source = { editable = "." }
dependencies = [
{ name = "cyclopts" },