Skip to content

Commit 767e71f

Browse files
Fixing 'fatal: not a git repository' warning
This fixes #1250 by piping the standard error when Parcels is installed over conda (and hence is not a git repository)
1 parent 4908455 commit 767e71f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

parcels/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import subprocess
22
import os
33
try:
4-
version = subprocess.check_output(['git', '-C', os.path.dirname(__file__), 'describe', '--tags']).decode('ascii').strip()
4+
version = subprocess.check_output(['git', '-C', os.path.dirname(__file__), 'describe', '--tags'], stderr=subprocess.PIPE).decode('ascii').strip()
55
except:
66
from parcels._version_setup import version as version # noqa

0 commit comments

Comments
 (0)