d
This commit is contained in:
18
CLI.py
18
CLI.py
@@ -2118,13 +2118,23 @@ class PipelineExecutor:
|
||||
except Exception:
|
||||
effective_source = current_source
|
||||
|
||||
selection_only = bool(
|
||||
len(stages) == 1 and stages[0] and stages[0][0].startswith("@")
|
||||
selection_start = bool(
|
||||
stages and stages[0] and stages[0][0].startswith("@")
|
||||
)
|
||||
if pending_tail and selection_only:
|
||||
|
||||
def _tail_is_suffix(existing: List[List[str]], tail: List[List[str]]) -> bool:
|
||||
if not tail or not existing:
|
||||
return False
|
||||
if len(tail) > len(existing):
|
||||
return False
|
||||
return existing[-len(tail):] == tail
|
||||
|
||||
if pending_tail and selection_start:
|
||||
if (pending_source is None) or (effective_source
|
||||
and pending_source == effective_source):
|
||||
stages = list(stages) + list(pending_tail)
|
||||
# Only append the pending tail if the user hasn't already provided it.
|
||||
if not _tail_is_suffix(stages, pending_tail):
|
||||
stages = list(stages) + list(pending_tail)
|
||||
try:
|
||||
if hasattr(ctx, "clear_pending_pipeline_tail"):
|
||||
ctx.clear_pending_pipeline_tail()
|
||||
|
||||
Reference in New Issue
Block a user