From 935cd2a8937af28162c71158bb4fb9b99bfa4825 Mon Sep 17 00:00:00 2001 From: stxue1 <122345910+stxue1@users.noreply.github.com> Date: Sat, 1 Jun 2024 01:39:18 -0700 Subject: [PATCH] Print hash with --version when installed as development (#4954) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- src/toil/utils/toilMain.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/toil/utils/toilMain.py b/src/toil/utils/toilMain.py index 895bf44ad8..9449b1571f 100755 --- a/src/toil/utils/toilMain.py +++ b/src/toil/utils/toilMain.py @@ -78,6 +78,11 @@ def printHelp(modules: Dict[str, types.ModuleType]) -> None: def printVersion() -> None: try: - print(metadata_version('toil')) + detected_version = metadata_version('toil') + if "a" in detected_version: + # This probably means Toil is installed as development + print(version) + else: + print(detected_version) except: print(f'Version gathered from toil.version: {version}')