Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # 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 · Fixed by #826
Closed

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

CxRes opened this issue Apr 1, 2020 · 1 comment · Fixed by #826

Comments

@CxRes
Copy link

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 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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants