diff --git a/noir/bootstrap.sh b/noir/bootstrap.sh index b4373eb9a80..acfdb789c47 100755 --- a/noir/bootstrap.sh +++ b/noir/bootstrap.sh @@ -15,8 +15,11 @@ if [ -n "$CMD" ]; then fi fi -# Attempt to just pull artefacts from CI and exit on success. -[ -n "${USE_CACHE:-}" ] && ./bootstrap_cache.sh && exit +# Attempt to pull artifacts from CI if USE_CACHE is set and verify nargo usability. +if [ -n "${USE_CACHE:-}" ]; then + ./bootstrap_cache.sh && ./noir-repo/target/release/nargo --version >/dev/null 2>&1 && exit 0 +fi +# Continue with native bootstrapping if the cache was not used or nargo verification failed. ./scripts/bootstrap_native.sh -./scripts/bootstrap_packages.sh \ No newline at end of file +./scripts/bootstrap_packages.sh