Fixed #32610 -- Fixed get_git_changeset() on Linux.
shell=True is required on Windows. Unfortunately passing a sequence to
subprocess.run() behaves differently on Linux, i.e. the first item
specifies the command string, and any additional items are treated as
additional arguments to the shell itself.
https://docs.python.org/3.9/library/subprocess.html#subprocess.Popen
https://docs.python.org/3.9/library/subprocess.html#converting-an-argument-sequence-to-a-string-on-windows
Regression in a44d80f88e
.
This commit is contained in:
parent
548dce50cf
commit
cfe47b7686
|
@ -79,7 +79,7 @@ def get_git_changeset():
|
||||||
"""
|
"""
|
||||||
repo_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
repo_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
git_log = subprocess.run(
|
git_log = subprocess.run(
|
||||||
['git', 'log', '--pretty=format:%ct', '--quiet', '-1', 'HEAD'],
|
'git log --pretty=format:%ct --quiet -1 HEAD',
|
||||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
|
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
|
||||||
shell=True, cwd=repo_dir, universal_newlines=True,
|
shell=True, cwd=repo_dir, universal_newlines=True,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue