-
Notifications
You must be signed in to change notification settings - Fork 3
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
Crashes on bad directory/malformed package.json #79
Comments
What was the error message/stacktrace you were getting? IIRC, the plugin uses pacote (used by npm) underneath to load the packages. I guess it assumes that everything is valid. |
Ah, maybe a couple of basic pre-checks then. The error is easy to reproduce, put a blank folder in plugins folder, or modify a package.json to be invalid. Nice library by the way. Using it to make our parental freedom automation app extensible. |
I think I can do something to improve here. But can you please help me with what other functions fail? |
Sure, simple improvement here and I'll post other issues as I come across them. Thanks! |
Probably need some extra checks in the code.
I had a .idea folder in the plugins directory and also had a test plugin in there that had a syntax error in the package.json (missing key quotes, duh!)
Anyway, the epm.list function (and maybe others) should probably just reject (or log) any non-compliant plugin folders.
Such as if package.json is missing or cannot be JSON parsed.
The text was updated successfully, but these errors were encountered: