diff --git a/mvt/common/command.py b/mvt/common/command.py index c034573..b9cd9f6 100644 --- a/mvt/common/command.py +++ b/mvt/common/command.py @@ -13,7 +13,7 @@ from typing import Callable, Optional from mvt.common.indicators import Indicators from mvt.common.module import run_module, save_timeline -from mvt.common.utils import convert_datetime_to_iso, generate_hashes_from_path +from mvt.common.utils import convert_datetime_to_iso, generate_hashes_from_path, get_sha256_from_file_path from mvt.common.version import MVT_VERSION @@ -119,6 +119,10 @@ class Command: with open(info_path, "w+", encoding="utf-8") as handle: json.dump(info, handle, indent=4) + if self.target_path and (os.environ.get("MVT_HASH_FILES") or self.hashes): + info_hash = get_sha256_from_file_path(info_path) + self.log.warning("Reference hash of the info.json file : %s", info_hash) + def generate_hashes(self) -> None: """ Compute hashes for files in the target_path