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

ensureSymlink silently exits if the destination exists and is not a symlink #786

Closed
CxRes opened this issue Apr 1, 2020 · 1 comment
Closed

Comments

@CxRes
Copy link

@CxRes CxRes commented Apr 1, 2020

Looking into the code, I found that ensure* methods only verify if the destination path exist and not if the path is of the right * type. IMHO an error should be thrown if path is of the wrong type. Perhaps fs.stat instead of fs.access should suffice...

@RyanZim
Copy link
Collaborator

@RyanZim RyanZim commented Jun 3, 2020

Yep, ensureFile has checks in place, but it looks like Link/Symlink don't. Milestoning for v10 since this would be a breaking change, technically.

@RyanZim RyanZim added this to the 10.0.0 milestone Jun 3, 2020
RyanZim added a commit that referenced this issue Jul 29, 2020
RyanZim added a commit that referenced this issue Jul 29, 2020
RyanZim added a commit that referenced this issue Apr 1, 2021
@RyanZim RyanZim closed this in #826 Apr 2, 2021
RyanZim added a commit that referenced this issue Apr 2, 2021
…ink (#826)

Fixes #786
Fixes #870
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants