mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 09:08:43 +08:00
relate: https://github.com/milvus-io/milvus/issues/42806 Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
17 lines
299 B
Bash
17 lines
299 B
Bash
#!/bin/bash
|
|
|
|
(
|
|
cd "$1" || exit 1
|
|
|
|
if [ "$2" == "--check" ]; then
|
|
if ! cargo fmt --all -- --check; then
|
|
echo "Rust code is not properly formatted."
|
|
exit 1
|
|
fi
|
|
echo "Check rust format success"
|
|
else
|
|
cargo fmt --all
|
|
fi
|
|
|
|
exit 0
|
|
) |