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