-
Notifications
You must be signed in to change notification settings - Fork 28
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
configurable support for symlinks #66
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,7 +95,7 @@ impl Template { | |
}; | ||
|
||
// And now generate the files in the output dir given | ||
let walker = WalkDir::new(&start_path) | ||
let walker = WalkDir::new(&start_path).follow_links(definition.symlinks) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we follow them by default? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wasn't sure of the original intent so I left it disabled by default, but I'm all for having it be the default case as long as it handles cycles during the walk and it doesn't effect Windows users. I'll test and makes sure that it doesn't introduce any issues there and if not make it the default. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Initially the use case was for templates to be self contained, eg a git repo so there was no real need for symlinks |
||
.into_iter() | ||
.filter_entry(|e| { | ||
// Ignore .git/ folder | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we use an option, I'd rather have it
follow_symlinks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
much more descriptive, agreed. I'll make that change.