MarcusCemes/image-processing-pipeline

Manifest WriteStream error event on non-existent output directory

MarcusCemes opened this issue · 1 comments

Describe the bug
Attempting to open a WriteStream to write to the image manifest incurs a WriteStream error event, crashing the program, even if no images were processed.

To Reproduce
Steps to reproduce the behaviour:

  1. Create a configuration file with a non-existent output directory and a manifest file of some sort
  2. Run the program

Expected behaviour
The program should check whether the output (and eventually input) directories exist, or create them?

Screenshots

Error: ENOENT: no such file or directory, open 'C:\Users\Marcus\AppData\Local\Temp\ipp\output\manifest.json'
Emitted 'error' event on WriteStream instance at:
    at WriteStream.onerror (_stream_writable.js:670:14)
    at WriteStream.emit (events.js:314:20)
    at internal/fs/streams.js:375:14
    at FSReqCallback.oncomplete (fs.js:164:23) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'open',
  path: 'C:\\Users\\Marcus\\AppData\\Local\\Temp\\ipp\\output\\manifest.json'
}

Desktop (please complete the following information):

  • OS: Windows 10
  • Version @ipp/cli@1.1.0

Fixed in 2a64c04