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

Attempt to parse misconfigured license declaration #2

Merged
merged 1 commit into from
Aug 5, 2019
Merged

Attempt to parse misconfigured license declaration #2

merged 1 commit into from
Aug 5, 2019

Conversation

gantoine
Copy link

@gantoine gantoine commented Aug 3, 2019

Running delice on a project kept failing to parse the emojione package.json licenses declaration, since it's misconfigured as an object, and not an array.

"licenses": {
  "type": "(MIT)",
  "url": "https://github.com/emojione/emojione/blob/master/LICENSE.md"
},

This PR attempts to address missing and misconfigured licenses declarations by handling objects. I considered ignoring it and simply return "invalid license", but since this was the only case, it felt better to address it "correctly".

@jonchurch
Copy link

jonchurch commented Aug 3, 2019

I tested this and it also fixes cutenode/delice#2

Their issue was coming from the same type of error, a licenses field which was an object

@bnb
Copy link
Member

bnb commented Aug 5, 2019

LGTM. Going to :shipit:

@bnb bnb merged commit 2c7ef18 into cutenode:master Aug 5, 2019
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

Successfully merging this pull request may close these issues.

3 participants