File tree 2 files changed +20
-3
lines changed
2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 6
6
"prepare" : " node ./yarn-project-base/scripts/update_package_jsons.mjs && yarn workspaces foreach run prepare && workspaces-to-typescript-project-references --tsconfigPath tsconfig.json && prettier -w */tsconfig.json" ,
7
7
"prepare:check" : " node ./yarn-project-base/scripts/update_package_jsons.mjs --check && workspaces-to-typescript-project-references --check --tsconfigPath tsconfig.json" ,
8
8
"docs" : " typedoc --out docs/dist && cd docs && yarn serve" ,
9
- "formatting" : " FORCE_COLOR=true yarn workspaces foreach -p -j unlimited -v run formatting" ,
9
+ "formatting" : " ./run_nargo_fmt.sh --check && FORCE_COLOR=true yarn workspaces foreach -p -j unlimited -v run formatting" ,
10
10
"formatting:fix" : " ./run_nargo_fmt.sh && FORCE_COLOR=true yarn workspaces foreach -p -v run formatting:fix" ,
11
11
"lint" : " yarn eslint --cache --ignore-pattern l1-artifacts ." ,
12
12
"format" : " yarn prettier --cache -w ." ,
Original file line number Diff line number Diff line change 1
- #! /bin/bash
1
+ #! /usr/ bin/env bash
2
2
3
- nargo_executable=" $( git rev-parse --show-toplevel) /noir/target/release/nargo"
3
+ # Note: This script formats the files multiple times when the given project is included in a workspace.
4
+ # Tackling this became a time sink, so I decided to leave it as is for now.
5
+
6
+ set -eu
7
+
8
+ # We set the executable path as if we were in CI
9
+ nargo_executable=" /usr/src/noir/target/release/nargo"
10
+
11
+ # Check if nargo_executable exists and is executable
12
+ if [ ! -x " $nargo_executable " ]; then
13
+ # If not, we try to set a nargo path as if the script was run locally
14
+ nargo_executable=" $( git rev-parse --show-toplevel) /noir/target/release/nargo"
15
+
16
+ if [ ! -x " $nargo_executable " ]; then
17
+ echo " Error: nargo executable not found"
18
+ exit 1
19
+ fi
20
+ fi
4
21
5
22
# Find all Nargo.toml files and run 'nargo fmt'
6
23
find . -name " Nargo.toml" | while read -r file; do
You can’t perform that action at this time.
0 commit comments