Closed josh-padnick closed 6 years ago
I needed a way for gruntwork-install to both download the module files and also convert a symlink in a module folder (e.g. /module/foo/bash --> /_bash/live) to a "hard link" that contains the same file or folder contents as the symlink target.
Why? Why are you using symlinks at all?
Why are you using symlinks at all?
See https://github.com/gruntwork-io/gruntwork-installer/pull/26#issuecomment-374910404 for ongoing discussion.
Based on great discussions with the team, the use case that motivated this feature (#38) is better handled by treating recursive dependencies as a first-class problem, whereas this is really a hacky approach to solving that.
Although this is kind of a handy feature, code is both an asset and a liability, so I'm closing this PR without merging in the name of having slightly less code to maintain. That being said, there are some general nice improvements to the code style here.
While working in https://github.com/gruntwork-io/package-kafka (note to public users: this is a private repo) to enable the loading of bash mocks, I needed a way for gruntwork-install to both download the module files and also convert a symlink in a module folder (e.g.
/module/foo/bash --> /_bash/live
) to a "hard link" that contains the same file or folder contents as the symlink target.This PR implements that as
--resolve-symlinks
.Edit: Note that this change is backwards compatible because the
--resolve-symlinks
options defaults tofalse
.