Skip to content

Commit 05a8546

Browse files
committed
update flag name
Signed-off-by: Ayush Kamat <[email protected]>
1 parent 2656c8a commit 05a8546

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

src/latch_cli/main.py

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,8 +1096,8 @@ def version(pkg_root: Path):
10961096
help="Set execution profile for Nextflow workflow",
10971097
)
10981098
@click.option(
1099-
"--destination",
1100-
"-d",
1099+
"--output",
1100+
"-o",
11011101
type=click.Path(path_type=Path),
11021102
default=None,
11031103
help=(
@@ -1111,7 +1111,7 @@ def generate_entrypoint(
11111111
metadata_root: Optional[Path],
11121112
nf_script: Path,
11131113
execution_profile: Optional[str],
1114-
destination: Optional[Path],
1114+
output: Optional[Path],
11151115
yes: bool,
11161116
):
11171117
"""Generate a `wf/entrypoint.py` file from a Nextflow workflow"""
@@ -1120,23 +1120,23 @@ def generate_entrypoint(
11201120
from latch_cli.nextflow.workflow import generate_nextflow_workflow
11211121
from latch_cli.services.register.utils import import_module_by_path
11221122

1123-
if destination is None:
1124-
destination = pkg_root / "wf" / "custom_entrypoint.py"
1123+
if output is None:
1124+
output = pkg_root / "wf" / "custom_entrypoint.py"
11251125

1126-
destination = destination.with_suffix(".py")
1126+
output = output.with_suffix(".py")
11271127

11281128
if not yes and not click.confirm(
1129-
f"Will generate an entrypoint at {destination}. Proceed?"
1129+
f"Will generate an entrypoint at {output}. Proceed?"
11301130
):
11311131
raise click.exceptions.Abort
11321132

1133-
destination.parent.mkdir(exist_ok=True)
1133+
output.parent.mkdir(exist_ok=True)
11341134

11351135
if (
11361136
not yes
1137-
and destination.exists()
1137+
and output.exists()
11381138
and not click.confirm(
1139-
f"Nextflow entrypoint already exists at `{destination}`. Overwrite?"
1139+
f"Nextflow entrypoint already exists at `{output}`. Overwrite?"
11401140
)
11411141
):
11421142
return
@@ -1161,11 +1161,7 @@ def generate_entrypoint(
11611161
raise click.exceptions.Exit(1)
11621162

11631163
generate_nextflow_workflow(
1164-
pkg_root,
1165-
metadata_root,
1166-
nf_script,
1167-
destination,
1168-
execution_profile=execution_profile,
1164+
pkg_root, metadata_root, nf_script, output, execution_profile=execution_profile
11691165
)
11701166

11711167

0 commit comments

Comments
 (0)