Rearrange formatting code so it doesn't require a configuration
Some checks failed
Format code / Format the kernel (push) Failing after 27s

This commit is contained in:
Arthur Beck 2025-02-23 08:29:55 -06:00
parent 6e9a8f9dfd
commit 305f22b425
Signed by: ArthurB
GPG key ID: ACE3D14F5CEF14BF

View file

@ -65,6 +65,14 @@
APHRODITE_DIR="${APHRODITE_DIR:-$TEMP_APHRODITE_DIR}" APHRODITE_DIR="${APHRODITE_DIR:-$TEMP_APHRODITE_DIR}"
if [[ $format = "true" ]]; then
echo "[INFO] Formatting"
pushd . 2>&1 > /dev/null
cd "$APHRODITE_DIR"
cargo fmt --all
exit 0
fi
DIR="${BASH_SOURCE%/*}" DIR="${BASH_SOURCE%/*}"
if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
@ -133,14 +141,6 @@
fi fi
} }
if [[ $format = "true" ]]; then
echo "[INFO] Formatting"
pushd . 2>&1 > /dev/null
cd "$APHRODITE_DIR"
cargo fmt --all
exit 0
fi
if [[ $# -ge 1 ]]; then if [[ $# -ge 1 ]]; then
echo "[INFO] Compiling only target $1" echo "[INFO] Compiling only target $1"
compile_one $1 compile_one $1