make `scripts/cargo-fmt.sh` $PWD agnostic (#29919)
This commit is contained in:
parent
174acef539
commit
ac5b2ffb39
|
@ -10,11 +10,19 @@ if [[ -z $cargo ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set -ex
|
fmt_dirs=(
|
||||||
|
.
|
||||||
|
programs/sbf
|
||||||
|
sdk/cargo-build-sbf/tests/crates/fail
|
||||||
|
sdk/cargo-build-sbf/tests/crates/noop
|
||||||
|
storage-bigtable/build-proto
|
||||||
|
web3.js/test/fixtures/noop-program
|
||||||
|
)
|
||||||
|
|
||||||
"$cargo" nightly fmt --all
|
for fmt_dir in "${fmt_dirs[@]}"; do
|
||||||
(cd programs/sbf && "$cargo" nightly fmt --all)
|
(
|
||||||
(cd sdk/cargo-build-sbf/tests/crates/fail && "$cargo" nightly fmt --all)
|
manifest_path="$(readlink -f "$here"/../"$fmt_dir"/Cargo.toml)"
|
||||||
(cd sdk/cargo-build-sbf/tests/crates/noop && "$cargo" nightly fmt --all)
|
set -ex
|
||||||
(cd storage-bigtable/build-proto && "$cargo" nightly fmt --all)
|
"$cargo" nightly fmt --all --manifest-path "$manifest_path"
|
||||||
(cd web3.js/test/fixtures/noop-program && "$cargo" nightly fmt --all)
|
)
|
||||||
|
done
|
||||||
|
|
Loading…
Reference in New Issue