fix: Warning user to install signatures (#1420)

* fix: Warning user to install signatures

---------

Co-authored-by: Willi Ballenthin <willi.ballenthin@gmail.com>
This commit is contained in:
naikordian
2023-04-05 17:59:41 +07:00
committed by GitHub
parent d46cf5b519
commit 8fe88f601f

View File

@@ -1038,6 +1038,13 @@ def handle_common_args(args):
logger.debug("-" * 80)
sigs_path = os.path.join(get_default_root(), "sigs")
if not os.path.exists(sigs_path):
logger.error(
"Using default signature path, but it doesn't exist. "
"Please install the signatures first: "
"https://github.com/mandiant/capa/blob/master/doc/installation.md#method-2-using-capa-as-a-python-library."
)
raise IOError(f"signatures path {sigs_path} does not exist or cannot be accessed")
else:
sigs_path = args.signatures
logger.debug("using signatures path: %s", sigs_path)