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

Error when diff path contains folders that does not exist #68

Open
alonseg opened this issue Apr 23, 2020 · 0 comments
Open

Error when diff path contains folders that does not exist #68

alonseg opened this issue Apr 23, 2020 · 0 comments

Comments

@alonseg
Copy link

alonseg commented Apr 23, 2020

'looks-same' saves the diff file using fs.createWriteStream(), passing that path as a parameter. Now, fs.createWriteStream() fails when the directory the path is pointing to doesn't exist - and that's the problem.

the shown error:

ENOENT: no such file or directory, open '...'

possible solutions:

  1. using fsExtra.outputFile() which creates any missing directories. (best IMO)
  2. Implementing the recursive mkdir ourselves

initially found here

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

No branches or pull requests

1 participant