From 756b2a5bdc435c7983b4e37c2e89d5fa34eb71ef Mon Sep 17 00:00:00 2001 From: Mitchell Tracy Date: Thu, 7 Mar 2024 07:59:54 -0500 Subject: [PATCH] bootstrap noir natively if nargo is invalid --- noir/bootstrap.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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