aiiinotate 0.10.1 → 0.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cli/utils/io.js CHANGED
@@ -64,9 +64,16 @@ function fileArrayValidate (fileArr) {
64
64
  * @returns {Promise<string[]>}
65
65
  */
66
66
  async function parseImportInputFile(file) {
67
+ // ensure input file exists
68
+ const [ fileAbs, ok ] = fileOk(file);
69
+ if (!ok) {
70
+ console.error(`could not read import file: ${file}. exiting...`);
71
+ process.exit(1);
72
+ }
73
+
67
74
  // read `file` split it by lines, remove empty lines
68
75
  const fileArr =
69
- fileRead(file)
76
+ fileRead(fileAbs)
70
77
  .split("\n")
71
78
  .filter(l => !l.match(/^\s*$/g));
72
79
  return [ ...new Set(fileArrayValidate(fileArr)) ];