We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 25be8d8 commit d6dd417Copy full SHA for d6dd417
1 file changed
src/sdialog/util.py
@@ -42,7 +42,10 @@
42
def _get_dynamic_version() -> str:
43
""" Retrieves the current version of the package, appending the current git commit hash if available."""
44
try:
45
- commit_hash = subprocess.check_output(["git", "rev-parse", "HEAD"]).strip().decode("utf-8")
+ commit_hash = subprocess.check_output(
46
+ ["git", "rev-parse", "HEAD"],
47
+ stderr=subprocess.DEVNULL,
48
+ ).strip().decode("utf-8")
49
# If not a valid commit hash, set to empty string
50
if re.match(r"\b[0-9a-f]{5,40}\b", commit_hash):
51
return f"{__version__}+{commit_hash}"
0 commit comments