diff --git a/src/scancode/cli.py b/src/scancode/cli.py index 1e6bc0dc51e..b1e1d8562cd 100644 --- a/src/scancode/cli.py +++ b/src/scancode/cli.py @@ -546,6 +546,7 @@ def echo_func(*_args, **_kwargs): msg = 'At least one input path is required.' raise ScancodeError(msg) + included_paths = None if not isinstance(input, (list, tuple)): if not isinstance(input, str): msg = 'Unknown format: "{}".'.format(repr(input)) @@ -594,9 +595,9 @@ def echo_func(*_args, **_kwargs): # the input list of paths included_paths = [as_posixpath(path).rstrip('/') for path in input] # FIXME: this is a hack as this "include" is from an external plugin!!! - include = list(requested_options.get('include', []) or []) - include.extend(included_paths) - requested_options['include'] = include + #include = list(requested_options.get('include', []) or []) + #include.extend(included_paths) + #requested_options['include'] = include # ... and use the common prefix as our new input input = common_prefix # NOQA @@ -616,6 +617,7 @@ def echo_func(*_args, **_kwargs): test_mode=test_mode, test_slow_mode=test_slow_mode, test_error_mode=test_error_mode, + paths=included_paths, ) requested_options.update(standard_options)