Skip to content

syncback paths option doesn't work for paths below the top level #567

@pedantic-git

Description

@pedantic-git

By way of example, if I have this configuration in my Tiltfile:

syncback('sync lockfiles', 'deploy/name-pn', '/rails/', 
  paths=['db/schema.rb', 'Gemfile.lock', 'yarn.lock']
)

it will happily sync the Gemfile.lock and yarn.lock files but not the db/schema.rb file.

The reason for this is (I think) this behaviour -- the --exclude=* matches db/ before it has a chance to look inside that directory to find the db/schema.rb that it's trying to include.

I think the correct rsync syntax in this situation would be:

rsync --include=db --include=db/schema.rb [...] --exclude=*

It would be great if the parent --include filters were included automatically. I can have a go at a PR for this if you think it would be useful!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions