From d59b3bd4e09480459106c5ae2094ad4f2f783913 Mon Sep 17 00:00:00 2001 From: melvyn Date: Sun, 3 Nov 2019 06:53:03 -0800 Subject: [PATCH] update error handling in make.py for git-describe --- .idea/vcs.xml | 5 +++++ make.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 94a25f7..5fc0921 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -1,5 +1,10 @@ + + + diff --git a/make.py b/make.py index fd19c16..0c45448 100755 --- a/make.py +++ b/make.py @@ -353,7 +353,7 @@ def build_qt_files(): tag = subprocess.run(['git', 'describe', '--exact-match'], check=True, stderr=subprocess.PIPE, stdout=subprocess.PIPE).stdout.decode('utf-8').strip() except subprocess.CalledProcessError as e: - if b'no tag exactly matches' in e.stderr: + if b'no tag exactly matches' in e.stderr or b'No names found' in e.stderr: tag = 'pre-' + rev_sha else: raise SystemExit('Failed to fetch tag\n' + e.stderr.decode('utf-8'))