diff --git a/stack_orchestrator/version.py b/stack_orchestrator/version.py index a37cc0b6..c1e72bb3 100644 --- a/stack_orchestrator/version.py +++ b/stack_orchestrator/version.py @@ -24,9 +24,9 @@ def command(ctx): # See: https://stackoverflow.com/a/20885799/1701505 from stack_orchestrator import data - tag_file_path = resources.files(data) / "build_tag.txt" - if tag_file_path.exists(): - with open(tag_file_path, "r") as version_file: + # tag_file_path = resources.files(data) / + if resources.is_resource(data, "build_tag.txt"): + with resources.open_text(data, "build_tag.txt") as version_file: # TODO: code better version that skips comment lines version_string = version_file.read().splitlines()[1] else: