From 8dc8711becc2b3b05d8d14ec1ebc724bdbed6826 Mon Sep 17 00:00:00 2001 From: Vu Anh Date: Wed, 13 Mar 2019 14:20:42 +0700 Subject: [PATCH] GH-226: fix error in version_file path --- underthesea/cli.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/underthesea/cli.py b/underthesea/cli.py index 98b1520e..a9271d8b 100644 --- a/underthesea/cli.py +++ b/underthesea/cli.py @@ -1,4 +1,6 @@ # -*- coding: utf-8 -*- +import os + import click import platform from underthesea.util import download_component @@ -24,10 +26,10 @@ def data(): @main.command() def info(): - underthesea_version = open("VERSION").read().strip() + version_file = os.path.join(os.path.dirname(__file__), 'VERSION') + underthesea_version = open(version_file).read().strip() python_version = platform.python_version() - # system_info = f"{platform.system()}{platform.release()}" - system_info = "" + system_info = f"{platform.system()}{platform.release()}" print("") print("ENVIRONMENT") print(f" underthesea version : {underthesea_version}")