brikis98 / docker-osx-dev

A productive development environment with Docker on OS X
http://www.ybrikman.com/writing/2015/05/19/docker-osx-dev/
MIT License
1.43k stars 106 forks source link

Copy symlinks as symlinks #129

Closed LoicMahieu closed 8 years ago

LoicMahieu commented 8 years ago

Copy symlinks as symlinks

This PR add the flag -l to rsync in order to copy symlinks as symlinks.

Use case:

I use docker-osx-dev in my Node.js project. Node package manager, NPM symlinks executables in node_modules/.bin. Example:

gulp -> ../gulp/bin/gulp.js

This way allows developper to directly use node_modules/.bin. Furthermore, NPM allows us to define "scripts" where $PATH has been automatically append with this directory.

Hope it's clear. I tried to write tests... Hum... I didn't find where place it... Thanks for this project, really useful in our workflow.

brikis98 commented 8 years ago

Thanks for the PR!

Regarding tests, we have some unit tests in docker-osx-dev.bats, but we have been blocked on integration tests due to #7. See #97 for the latest status.

lmakarov commented 8 years ago

The -l (--links) flag should not be necessary if --archive is used.

From man rsync:

If --links is specified, then symlinks are recreated with the same target on the destination.
Note that --archive implies --links.