We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a113ec8 commit 669ed17Copy full SHA for 669ed17
sentry_sdk/utils.py
@@ -106,9 +106,16 @@ def get_git_revision():
106
# type: () -> Optional[str]
107
try:
108
with open(os.path.devnull, "w+") as null:
109
+ # prevent command prompt windows from popping up on windows
110
+ startupinfo = None
111
+ if sys.platform == "win32" or sys.platform == "cygwin":
112
+ startupinfo = subprocess.STARTUPINFO()
113
+ startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
114
+
115
revision = (
116
subprocess.Popen(
117
["git", "rev-parse", "HEAD"],
118
+ startupinfo=startupinfo,
119
stdout=subprocess.PIPE,
120
stderr=null,
121
stdin=null,
0 commit comments