mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
Suppress stderr in _get_version() (#5667)
This commit is contained in:
parent
0b8dec77c3
commit
88d2cb3976
@ -7,7 +7,9 @@ def _get_version(*, ignore_installed: bool = False) -> str:
|
|||||||
|
|
||||||
path = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
path = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||||
output = subprocess.check_output(
|
output = subprocess.check_output(
|
||||||
("git", "describe", "--tags", "--long", "--dirty"), cwd=path
|
("git", "describe", "--tags", "--long", "--dirty"),
|
||||||
|
stderr=subprocess.DEVNULL,
|
||||||
|
cwd=path,
|
||||||
)
|
)
|
||||||
_, count, commit, *dirty = output.decode("utf-8").strip().split("-", 3)
|
_, count, commit, *dirty = output.decode("utf-8").strip().split("-", 3)
|
||||||
dirty_suffix = f".{dirty[0]}" if dirty else ""
|
dirty_suffix = f".{dirty[0]}" if dirty else ""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user