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

-i and --input option with no source supplied crashes the tool #1

Closed
SerpentBytes opened this issue Sep 17, 2022 · 1 comment
Closed

Comments

@SerpentBytes
Copy link

Environment Information

Operation System: macOS Monterey
Node version: v16.17.0

Bug Description

Running the tool with the -i or --input option with no source file or directory supplied crashes it.

Running with -i:

[Error: ENOENT: no such file or directory, scandir ''] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'scandir',
  path: ''
}

Running with --input:

node:internal/fs/utils:347
    throw err;
    ^

Error: ENOENT: no such file or directory, open
    at Object.openSync (node:fs:594:3)
    at Object.readFileSync (node:fs:462:35)
    at getFileContent (/OSD600/repos/izyum-fork/bin/index.js:106:32)
    at proccessTextFile (/OSD600/repos/izyum-fork/bin/index.js:75:25)
    at proccessSingleFile (/OSD600/repos/izyum-fork/bin/index.js:85:5)
    at Object.<anonymous> (/OSD600/repos/izyum-fork/bin/index.js:120:9)
    at Module._compile (node:internal/modules/cjs/loader:1126:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
    at Module.load (node:internal/modules/cjs/loader:1004:32)
    at Function.Module._load (node:internal/modules/cjs/loader:839:12) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT'
}

@Myrfion
Copy link
Owner

Myrfion commented Sep 18, 2022

Fix in #8

@Myrfion Myrfion closed this as completed Sep 18, 2022
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

2 participants