[bazel] Fix presubmit to properly ignore missing buildifier
Change-Id: I27ecb7f9a9a8f407cfd257a2d421ed8044ae6e71 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/546496 Reviewed-by: John Stiles <johnstiles@google.com>
This commit is contained in:
parent
37b5f3b164
commit
d39593de31
@ -363,10 +363,10 @@ def _CheckBuildifier(input_api, output_api):
|
||||
subprocess.check_output(
|
||||
['buildifier', '--version'],
|
||||
stderr=subprocess.STDOUT)
|
||||
except subprocess.CalledProcessError:
|
||||
return output_api.PresubmitNotifyResult(
|
||||
except:
|
||||
return [output_api.PresubmitNotifyResult(
|
||||
'Skipping buildifier check because it is not on PATH. \n' +
|
||||
'You can download it from https://github.com/bazelbuild/buildtools/releases')
|
||||
'You can download it from https://github.com/bazelbuild/buildtools/releases')]
|
||||
|
||||
return _RunCommandAndCheckGitDiff(
|
||||
# One can change --lint=warn to --lint=fix to have things automatically fixed where possible.
|
||||
|
Loading…
Reference in New Issue
Block a user