mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-12-02 12:01:17 +00:00
Merge pull request #4039 from JustAnotherArchivist/dev-version-detection-2
Replace git cat-file -t with -e and explain the magic ID
This commit is contained in:
commit
0793f61496
@ -21,8 +21,9 @@ def get_dev_version() -> str:
|
|||||||
here = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
|
here = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
|
||||||
try:
|
try:
|
||||||
# Check that we're in the mitmproxy repository: https://github.com/mitmproxy/mitmproxy/issues/3987
|
# Check that we're in the mitmproxy repository: https://github.com/mitmproxy/mitmproxy/issues/3987
|
||||||
|
# cb0e3287090786fad566feb67ac07b8ef361b2c3 is the first mitmproxy commit.
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
['git', 'cat-file', '-t', 'cb0e3287090786fad566feb67ac07b8ef361b2c3'],
|
['git', 'cat-file', '-e', 'cb0e3287090786fad566feb67ac07b8ef361b2c3'],
|
||||||
stdout=subprocess.DEVNULL,
|
stdout=subprocess.DEVNULL,
|
||||||
stderr=subprocess.DEVNULL,
|
stderr=subprocess.DEVNULL,
|
||||||
cwd=here,
|
cwd=here,
|
||||||
|
Loading…
Reference in New Issue
Block a user