From 305f22b42538cbe571619ce94641ce328f4d2fa9 Mon Sep 17 00:00:00 2001 From: Arthur Beck Date: Sun, 23 Feb 2025 08:29:55 -0600 Subject: [PATCH] Rearrange formatting code so it doesn't require a configuration --- kernel/build | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/kernel/build b/kernel/build index cfea5ad..4893055 100755 --- a/kernel/build +++ b/kernel/build @@ -65,6 +65,14 @@ 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%/*}" if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi @@ -133,14 +141,6 @@ 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 echo "[INFO] Compiling only target $1" compile_one $1