Skip to content

Secondary flag error from click package #4572

@mthalman

Description

@mthalman

Description

When attempting to run scancode with the latest version of click that gets brought in as a dependency, you get the following error:

Traceback (most recent call last):
  File "/tmp/scancode-env/bin/scancode", line 5, in <module>
    from scancode.cli import scancode
  File "/tmp/scancode-env/lib/python3.10/site-packages/scancode/cli.py", line 383, in <module>
    def scancode(
  File "/tmp/scancode-env/lib/python3.10/site-packages/click/decorators.py", line 374, in decorator
    _param_memo(f, cls(param_decls, **attrs))
  File "/tmp/scancode-env/lib/python3.10/site-packages/commoncode/cliutils.py", line 454, in __init__
    super(PluggableCommandLineOption, self).__init__(
  File "/tmp/scancode-env/lib/python3.10/site-packages/click/core.py", line 2793, in __init__
    raise TypeError("Secondary flag is not valid for non-boolean flag.")
TypeError: Secondary flag is not valid for non-boolean flag.

How To Reproduce

  • Install scancode 32.4.1 with pip on Linux x64
  • Run scancode --license <repo-path>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions