Page MenuHomePhorge

D5101.1767166095.diff
No OneTemporary

Size
699 B
Referenced Files
None
Subscribers
None

D5101.1767166095.diff

diff --git a/scripts/rust_pre_commit.sh b/scripts/rust_pre_commit.sh
--- a/scripts/rust_pre_commit.sh
+++ b/scripts/rust_pre_commit.sh
@@ -3,19 +3,19 @@
set -e
# shellcheck source=/dev/null
-source "$HOME"/.cargo/env
+[[ -r "$HOME"/.cargo/env ]] && source "$HOME"/.cargo/env
PATHS="services/commtest"
-cargo > /dev/null
+command -v cargo > /dev/null
-for PATH in $PATHS; do
- pushd "$PATH"
- echo "formatting $PATH..."
+for directory in $PATHS; do
+ pushd "$directory"
+ echo "formatting ${directory}..."
cargo fmt --all -- --check
- echo "checking $PATH..."
+ echo "checking ${directory}..."
cargo check
- popd # $PATH
+ popd # $directory
done
echo "done formatting"

File Metadata

Mime Type
text/plain
Expires
Wed, Dec 31, 7:28 AM (10 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5872591
Default Alt Text
D5101.1767166095.diff (699 B)

Event Timeline