mirror of
https://fuchsia.googlesource.com/third_party/pigweed.googlesource.com/pigweed/pigweed
synced 2024-09-21 06:12:09 +00:00
doctor: check for 'cipd' in PATH.
Also add the cipd installation folder to PATH. Change-Id: I871b466079250473c41adcba61bd8787305c795f
This commit is contained in:
parent
7d1deb1b9d
commit
d527f91e21
|
@ -89,7 +89,7 @@ def update(argv=None):
|
|||
if not os.path.isdir(args.install_dir):
|
||||
os.makedirs(args.install_dir)
|
||||
|
||||
paths = []
|
||||
paths = [args.install_dir]
|
||||
env = {
|
||||
'CIPD_INSTALL_DIR': args.install_dir,
|
||||
'CIPD_CACHE_DIR': args.cache_dir,
|
||||
|
|
|
@ -109,6 +109,10 @@ def cipd(ctx: DoctorContext):
|
|||
"""Check cipd is set up correctly and in use."""
|
||||
cipd_path = 'pigweed'
|
||||
|
||||
cipd_exe = shutil.which('cipd')
|
||||
if not cipd_exe:
|
||||
ctx.fatal('cipd not in PATH')
|
||||
|
||||
temp = tempfile.NamedTemporaryFile(prefix='cipd', delete=False)
|
||||
subprocess.run(['cipd', 'acl-check', '-json-output', temp.name, cipd_path],
|
||||
stdout=subprocess.PIPE)
|
||||
|
|
Loading…
Reference in New Issue
Block a user