Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32539179
D5101.1767166095.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
699 B
Referenced Files
None
Subscribers
None
D5101.1767166095.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D5101: [Chore] Unbreak rust_pre_commit for UNIX
Attached
Detach File
Event Timeline
Log In to Comment