From 893d012c99a3049d3ba7d3071f26668d73d13fe5 Mon Sep 17 00:00:00 2001 From: Sylvain Tricot Date: Fri, 2 Jun 2023 11:33:22 +0200 Subject: [PATCH] Remove stderr output for 'git describe' call --- src/msspec/version.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/msspec/version.py b/src/msspec/version.py index bc5a91b..74c7351 100644 --- a/src/msspec/version.py +++ b/src/msspec/version.py @@ -35,8 +35,10 @@ PKGNAME = 'msspec' try: cmd = ["git describe|sed 's/-\([0-9]\+\)-.*/.dev\\1/g'"] - result = subprocess.run(cmd, stdout=subprocess.PIPE, shell=True) + result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, shell=True) __version__ = result.stdout.decode('utf-8').strip() + if __version__ == "": + raise except Exception as err: try: thisfile_path = os.path.abspath(__file__)