webscopeio / license.sh

License checker tool - We're in a beta phase, any help is appreciated, especially reporting issues
https://webscopeio.github.io/license.sh
MIT License
40 stars 6 forks source link

Check without project #92

Closed 4rokis closed 4 years ago

4rokis commented 4 years ago

Running check on wrong directory gives

(license.sh) [theodore@milacik license.sh]$ ./license-sh ..
Config file '../.license-sh.json' not found...
Traceback (most recent call last):
  File "./license-sh", line 2, in <module>
    from license_sh import __main__
  File "/home/theodore/Workspace/license.sh/license_sh/__main__.py", line 25, in <module>
    run_license_sh(arguments)
  File "/home/theodore/Workspace/license.sh/license_sh/commands/run_license_sh.py", line 66, in run_license_sh
    dep_tree, whitelist, ignored_packages=ignored_packages, get_full_tree=tree
  File "/home/theodore/Workspace/license.sh/license_sh/helpers.py", line 218, in get_dependency_tree_with_licenses
    dep_tree, whitelist=whitelist, ignored_packages=ignored_packages
  File "/home/theodore/Workspace/license.sh/license_sh/helpers.py", line 159, in annotate_dep_tree
    node.license_normalized = normalize_license_expression(node.license)
AttributeError: 'NoneType' object has no attribute 'license'
(license.sh) [theodore@milacik license.sh]$ 

There should be more readable error