diff --git a/code/scripts/test_build.py b/code/scripts/test_build.py index 64738f3e..a6fd98a6 100755 --- a/code/scripts/test_build.py +++ b/code/scripts/test_build.py @@ -100,7 +100,8 @@ def cache_cleanup(cache_path: pathlib.Path, offset: datetime.timedelta): def build_configurations(args: argparse.Namespace, configurations: list[pathlib.Path]): cache_path = args.cache_path.resolve() - cache_cleanup(cache_path, args.expire_cache) + if cache_path.is_dir(): + cache_cleanup(cache_path, args.expire_cache) cmd = ["platformio", "run"] if args.silent: