xref: /aosp_15_r20/external/skia/infra/bots/recipe_modules/checkout/resources/assert_git_cipd.py (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1# Copyright 2024 Google LLC
2#
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6import subprocess
7import sys
8
9which = 'where' if sys.platform == 'win32' else 'which'
10git = subprocess.check_output([which, 'git']).decode('utf-8')
11print('git was found at %s' % git)
12if 'cipd_bin_packages' not in git:
13  print('Git must be obtained through CIPD.', file=sys.stderr)
14  sys.exit(1)
15