Skip to content

Commit a376efb

Browse files
authored
Merge pull request #12105 from velconia/fix_is_taged
Throw all warnings from git describe in setup.py.in
2 parents e42f9b7 + 1840bd7 commit a376efb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/setup.py.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ def get_patch():
4242

4343
def is_taged():
4444
try:
45-
cmd = ['git', 'describe', '--exact-match', '--tags']
45+
cmd = ['git', 'describe', '--exact-match', '--tags', 'HEAD', '2>/dev/null']
4646
git_tag = subprocess.Popen(cmd, stdout = subprocess.PIPE).communicate()[0].strip()
4747
except:
4848
return False
4949

50-
if git_tag.replace('v', '') == '@PADDLE_VERSION@':
50+
if str(git_tag).replace('v', '') == '@PADDLE_VERSION@':
5151
return True
5252
else:
5353
return False

0 commit comments

Comments
 (0)