diff --git a/env_setup/cipd/update.py b/env_setup/cipd/update.py index 53ba1aa52..530be7406 100755 --- a/env_setup/cipd/update.py +++ b/env_setup/cipd/update.py @@ -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, diff --git a/pw_doctor/py/pw_doctor/doctor.py b/pw_doctor/py/pw_doctor/doctor.py index 266352b3f..d0a0c4841 100755 --- a/pw_doctor/py/pw_doctor/doctor.py +++ b/pw_doctor/py/pw_doctor/doctor.py @@ -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)