Skip to content

Commit aa2708b

Browse files
author
Ed-5100
committed
cli(add-pipeline): added pipeline config option
1 parent 223d022 commit aa2708b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tapa/steps/add_pipeline.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@
2727
type=Path,
2828
help="Path to the device configuration file.",
2929
)
30-
def add_pipeline(device_config: Path | None) -> None:
30+
@click.option(
31+
"--pipeline-config",
32+
type=click.Path(exists=True, dir_okay=False, readable=True, resolve_path=True),
33+
help="File recording the pipeline configuration",
34+
required=False,
35+
)
36+
def add_pipeline(device_config: Path | None, pipeline_config: Path | None) -> None:
3137
"""Run external add pipeline tool."""
3238
if not device_config:
3339
_logger.error("Device configuration file is required for add pipeline.")
@@ -56,6 +62,9 @@ def add_pipeline(device_config: Path | None) -> None:
5662
str(device_config),
5763
]
5864

65+
if pipeline_config:
66+
add_pipeline_cmd.extend(["--pipeline-config", str(pipeline_config)])
67+
5968
subprocess.run(add_pipeline_cmd, check=True)
6069

6170
export_dir = Path(program.work_dir) / _EXPORTER_DIR

0 commit comments

Comments
 (0)