factorial-io / phabalicious

Supports your deployments and every-day devops-tasks
http://docs.phab.io
MIT License
18 stars 3 forks source link

CopyAction special handling of * does not apply to multiple 'from' arguments #157

Closed mikran closed 3 years ago

mikran commented 3 years ago

I'm not sure if this is bug or feature request, but following configuration had unexpected outcome

- action: copy
  arguments:
    from:
      - "archive-a/sites/default/files/*"
      - "archive-b/sites/default/files/*"
    to: "./sites/default/files/"

I was expecting to add files from both archive-a and archive-b to whatever happened to be in files dir already from previous operations.

This works like that when I have just one argument to copy from, but as soon as I entered the second one the special handling of * was not applied anymore and that resulted in me having only files from archive-b and nothing else.

Earlier iteration of said CopyAction I had the 'to' argument as './' but let's now talk about that :)

stmh commented 3 years ago

yes, the copy-action is not suited for this scenario. the copy-action makes sure, that you have the exact same set of files in your target as in source to prevent problems with old files still present (which led to hard-to-track problems in the past)

A script-method might be more suitable for this use-case.