Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pedantic-git opened this issue Apr 10, 2024 · 1 comment
Open

Comments

@pedantic-git
Copy link
Contributor

pedantic-git commented Apr 10, 2024

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!

@pedantic-git
Copy link
Contributor Author

Little update - I've created a PR that adds an rsync_options method and I'm using this to work around it (and also to prove it's working). That's in #568.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant