diff options
author | Hal Canary <halcanary@google.com> | 2018-01-22 14:51:02 -0500 |
---|---|---|
committer | Hal Canary <halcanary@google.com> | 2018-01-22 20:33:49 +0000 |
commit | ec97ac9be2b1d12620337da2b99c95e214170ded (patch) | |
tree | eb3077d8a42ed59d3bd4c2392a1c9d07d901ef48 /bin | |
parent | a9de760a217cf48c974d6c51b4ba88f08c269bbe (diff) |
fetch-clang-format: better error checking
Change-Id: Idc0e984275056128301d4f1ae66aa6ace67b05d5
Reviewed-on: https://skia-review.googlesource.com/98322
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/fetch-clang-format | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/fetch-clang-format b/bin/fetch-clang-format index 78b5c05221..98216d835c 100755 --- a/bin/fetch-clang-format +++ b/bin/fetch-clang-format @@ -19,7 +19,11 @@ def fetch(target): 'buildtools/mac/' + target if 'darwin' in sys.platform else \ 'buildtools/win/'+ target + '.exe' - sha1 = open(target_path + '.sha1').read().strip() + sha1_path = target_path + '.sha1' + if not os.path.exists(sha1_path): + print sha1_path, 'is missing. Did you run `tools/git-sync-deps`?' + exit(1) + sha1 = open(sha1_path).read().strip() def sha1_of_file(path): h = hashlib.sha1() |