diff options
-rw-r--r-- | mitmproxy/version.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mitmproxy/version.py b/mitmproxy/version.py index 82368296..f14eb697 100644 --- a/mitmproxy/version.py +++ b/mitmproxy/version.py @@ -20,6 +20,13 @@ def get_dev_version() -> str: here = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) try: + # Check that we're in the mitmproxy repository: https://github.com/mitmproxy/mitmproxy/issues/3987 + subprocess.run( + ['git', 'cat-file', '-t', 'cb0e3287090786fad566feb67ac07b8ef361b2c3'], + stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL, + cwd=here, + check=True) git_describe = subprocess.check_output( ['git', 'describe', '--tags', '--long'], stderr=subprocess.STDOUT, |