When using Merge (or Combo's merge syntax), or when using RewritePath, or for many other reasons, it may happen that a transform ends up producing several files at the same path.

In such cases, the engine needs to decide what to do: should it keep the last file? should it report an error? should it concatenate the files together?

Transforms that need to take such decisions can be configured with a conflict resolution: - Combo uses UseLast by default, but can be configured to do otherwise - authors can also explicitly end a transform Chain with a UniquePath, which by default uses Fail (again, this is customizable)

Syntax Reference

type: Combo      # often omitted
merge:
  - <transform>
chain:
  - <transform>
  - ...
onConflict: <conflict resolution>  # defaults to 'UseLast'
type: Chain      # or implicitly using Combo
transformations:
  - <transform>
  - <transform>
  - type: UniquePath
    strategy: <conflict resolution>  # defaults to 'Fail'

Available Strategies

The following values and behaviours are available:

  • Fail: stop processing on the first file that exhibits path conflicts.
  • UseFirst: for each conflicting file, the file produced first (typically by a transform appearing earlier in the yaml definition) is retained
  • UseLast: for each conflicting file, the file produced last (typically by a transform appearing later in the yaml definition) is retained
  • Append: the conflicting versions of files are concatenated (as if using cat file1 file2 ...), with files produced first appearing first.

See Also

check-circle-line exclamation-circle-line close-line
Scroll to top icon