librariesio / license-compatibility

:copyright: Check compatibility between different SPDX licenses
https://libraries.io/github/librariesio/license-compatibility
MIT License
34 stars 5 forks source link

Not getting any output #44

Closed sunilk747 closed 6 years ago

sunilk747 commented 6 years ago

I want to know if MPL 2.0 and EPL 1.0 are compatible, same with Apache 2.0 and EPL 1.0. But when I am trying license-compatibility EPL-1.0 MPL-2.0, I am not getting any output.

pawamoy commented 6 years ago

When there is no output, it means the licenses are compatible. The return code is 0.

If they are not compatible, a message like GPL-3.0 is not forward-compatible with ISC will be written to stderr, and the return code will be 1.

You can use it in bash scripts like this:

if license-compatibility EPL-1.0 MPL-2.0 Apache-2.0; then
  : do stuff
else
  : do other stuff
fi

The command line tool is mainly used to detect incompatibilities, for the user to fix it. But I agree it can be confusing. Maybe a note in the README would do.

sunilk747 commented 6 years ago

@Pawamoy Wouldn't it be a good idea to give a message as output saying the license's are compatible instead of not giving any output at all?

pawamoy commented 6 years ago

Yes it could be helpful to the user. If @andrew is OK with that I'll send a PR!

andrew commented 6 years ago

@Pawamoy yep sounds good to me 👍

andrew commented 6 years ago

Fixed by @Pawamoy in #49