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

gettext-extractor fails when glob matches a directory #63

Closed
federicobond opened this issue Apr 21, 2023 · 2 comments
Closed

gettext-extractor fails when glob matches a directory #63

federicobond opened this issue Apr 21, 2023 · 2 comments
Labels

Comments

@federicobond
Copy link

I had a directory named chart.js which caused gettext-extractor to try to incorrectly read it as a file. I had to console.log every matched fileName to find the culprit. Do you think it may make sense to add special handling for this case?

node:fs:756
  handleErrorFromBinding(ctx);
  ^

Error: EISDIR: illegal operation on a directory, read
    at Object.readSync (node:fs:756:3)
    at tryReadSync (node:fs:437:20)
    at Object.readFileSync (node:fs:483:19)
    at JsParser.parseFile (/Users/federicobond/code/signatura-connect/node_modules/gettext-extractor/dist/parser.js:58:29)
    at JsParser.parseFilesGlob (/Users/federicobond/code/signatura-connect/node_modules/gettext-extractor/dist/parser.js:66:18)
    at file:///Users/federicobond/code/signatura-connect/js-gettext.mjs:21:4
    at ModuleJob.run (node:internal/modules/esm/module_job:193:25) {
  errno: -21,
  syscall: 'read',
  code: 'EISDIR'
}
@lukasgeiter
Copy link
Owner

Fixed in version 3.7.2

@federicobond
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants