Skip to content

Commit 5cd5f74

Browse files
Do not setup license index on --package-only
We do not need the license index in a --package-only scan as this is designed to do a fast package detection only scan which skips the license detection. As license index loading takes a couple seconds in each case, this makes the package only scan much faster. Signed-off-by: Ayan Sinha Mahapatra <asmahapatra@aboutcode.org>
1 parent dde6bc9 commit 5cd5f74

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/licensedcode/plugin_license.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ def setup(self, **kwargs):
152152
This is a cache warmup such that child process inherit from the
153153
loaded index.
154154
"""
155+
if kwargs.get("package_only"):
156+
return
157+
155158
from licensedcode.cache import populate_cache
156159
populate_cache()
157160

0 commit comments

Comments
 (0)