Skip to content

Commit

Permalink
chore: bootstrap noir natively if nargo is invalid (#5034)
Browse files Browse the repository at this point in the history
On mac, after bootstrap with cache, if one runs
```
❯ ./noir/noir-repo/target/release/nargo
zsh: exec format error: ./noir/noir-repo/target/release/nargo
```
So check to see that our cached version of nargo is compatible, and
build if need be.
just-mitch authored Mar 7, 2024
1 parent 039eafc commit df089de
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions noir/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -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
./scripts/bootstrap_packages.sh

0 comments on commit df089de

Please sign in to comment.