diff options
| author | Jamie Madill <jmadill@chromium.org> | 2017-12-15 16:25:16 -0500 |
|---|---|---|
| committer | Tobin Ehlis <tobine@google.com> | 2017-12-15 15:57:26 -0700 |
| commit | d047d96e3399ba0e8ec668feebc968729215c491 (patch) | |
| tree | 73d66066ce6068c262f39e7e048308d21c653096 | |
| parent | 9a4eb6ab133a978a471fbfc6c033b0e4d35bc4c4 (diff) | |
| download | usermoji-d047d96e3399ba0e8ec668feebc968729215c491.tar.xz | |
scripts: Prefer git.bat on Windows.
Calling git.bat seems to work in every instance, whereas some
installations don't have access to "git" directly.
| -rw-r--r-- | scripts/external_revision_generator.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/external_revision_generator.py b/scripts/external_revision_generator.py index 493068ea..bdfe3549 100644 --- a/scripts/external_revision_generator.py +++ b/scripts/external_revision_generator.py @@ -33,7 +33,9 @@ if __name__ == '__main__': output_header_file = sys.argv[3] # Extract commit ID from the specified source directory - commit_id = subprocess.check_output(["git", "rev-parse", "HEAD"], cwd=source_dir).decode('utf-8').strip() + # Call git.bat on Windows for compatiblity. + git_binary = "git.bat" if os == "nt" else "git" + commit_id = subprocess.check_output([git_binary, "rev-parse", "HEAD"], cwd=source_dir).decode('utf-8').strip() # Write commit ID to output header file with open(output_header_file, "w") as header_file: |
