Skip to content

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

@alonseg

Description

@alonseg

'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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions