Skip to content

Commit

Permalink
feat: support symlinked pipelines to avoid repetition
Browse files Browse the repository at this point in the history
  • Loading branch information
daconstenla committed Jan 10, 2025
1 parent f1e494b commit e331a09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kpops/cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from collections.abc import Iterable, Iterator
from pathlib import Path
from glob import glob

from kpops.const.file_type import PIPELINE_YAML

Expand All @@ -20,7 +21,7 @@ def collect_pipeline_paths(pipeline_paths: Iterable[Path]) -> Iterator[Path]:
if pipeline_path.is_file():
yield pipeline_path
elif pipeline_path.is_dir():
yield from sorted(pipeline_path.glob(f"**/{PIPELINE_YAML}"))
yield from sorted(Path(p).resolve() for p in glob(f"{pipeline_path}/**/{PIPELINE_YAML}", recursive=True))
else:
msg = f"The entered pipeline path '{pipeline_path}' should be a directory or file."
raise ValueError(msg)

0 comments on commit e331a09

Please sign in to comment.