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

Skip with warn for circular symlinks #169

Merged
merged 1 commit into from
Feb 18, 2021
Merged

Skip with warn for circular symlinks #169

merged 1 commit into from
Feb 18, 2021

Conversation

ath0mas
Copy link
Contributor

@ath0mas ath0mas commented Feb 14, 2021

Skip with warn for circular symlinks, instead of exit with error.

Fix #168

@paulmillr
Copy link
Owner

Why does this require a change to warn? Can't you just handle error instead?

@ath0mas
Copy link
Contributor Author

ath0mas commented Feb 18, 2021

Current error means _onError will call destroy and abort the stream.

no more entries, warning or errors are emitted

while my use case is to skip and let the stream continue flowing.
Also, thrown error does not have a code to match it properly.

With this PR it emits a warn event, and indeed with given code someone can use it to abort or not.

// Optionally call stream.destroy() in `warn()` ...

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

Successfully merging this pull request may close these issues.

Warn instead of error for recursive detection
2 participants