move subcommand one place up as project_dir has default

This commit is contained in:
svlandeg 2020-06-30 16:04:53 +02:00
parent a46b76f188
commit 1ae6fa2554
1 changed files with 2 additions and 2 deletions

View File

@ -149,8 +149,8 @@ def project_run_all_cli(
def project_run_cli( def project_run_cli(
# fmt: off # fmt: off
ctx: typer.Context, ctx: typer.Context,
project_dir: Path = Arg(Path.cwd(), help="Location of project directory. Defaults to current working directory.", exists=True, file_okay=False),
subcommand: str = Arg(None, help="Name of command defined in project config"), subcommand: str = Arg(None, help="Name of command defined in project config"),
project_dir: Path = Arg(Path.cwd(), help="Location of project directory. Defaults to current working directory.", exists=True, file_okay=False),
show_help: bool = Opt(False, "--help", help="Show help message and available subcommands") show_help: bool = Opt(False, "--help", help="Show help message and available subcommands")
# fmt: on # fmt: on
): ):
@ -173,8 +173,8 @@ def project_run_cli(
@project_cli.command("exec", hidden=True) @project_cli.command("exec", hidden=True)
def project_exec_cli( def project_exec_cli(
# fmt: off # fmt: off
project_dir: Path = Arg(Path.cwd(), help="Location of project directory. Defaults to current working directory.", exists=True, file_okay=False),
subcommand: str = Arg(..., help="Name of command defined in project config"), subcommand: str = Arg(..., help="Name of command defined in project config"),
project_dir: Path = Arg(Path.cwd(), help="Location of project directory. Defaults to current working directory.", exists=True, file_okay=False),
# fmt: on # fmt: on
): ):
"""Execute a command defined in the project config. This CLI command is """Execute a command defined in the project config. This CLI command is