Skip to content

Commit

Permalink
fix: bootstrap.sh git hook for monorepo (#1256)
Browse files Browse the repository at this point in the history
This had the wrong path inside the monorepo.
  • Loading branch information
ludamad authored Jul 28, 2023
1 parent 9b65fd5 commit 8f707b7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions circuits/cpp/barretenberg/cpp/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ rm -rf ./build-wasm
# Install formatting git hook.
HOOKS_DIR=$(git rev-parse --git-path hooks)
# The pre-commit script will live in a barretenberg-specific hooks directory
# That may be just in the top level of this repository,
# or may be in a .git/modules/barretenberg subdirectory when this is actually a submodule
# Either way, running `git rev-parse --show-toplevel` from the hooks directory gives the path to barretenberg
echo "cd \$(git rev-parse --show-toplevel)/cpp && ./format.sh staged" > $HOOKS_DIR/pre-commit
# Find it based on the current working directory.
echo "cd $(pwd)/cpp && ./format.sh staged" > $HOOKS_DIR/pre-commit
chmod +x $HOOKS_DIR/pre-commit

# Determine system.
Expand Down

0 comments on commit 8f707b7

Please sign in to comment.