From d360cf86cb0f89c5372ef910d55f9fb1ad7d8ddc Mon Sep 17 00:00:00 2001 From: a-kenji Date: Tue, 30 Jul 2024 11:37:45 +0200 Subject: [PATCH] merge-after-ci: use `nix fmt` Use `nix fmt` instead of `treefmt` directly, since `treefmt` depends on the cached devshell. This can lead to confusing errors. --- pkgs/tea-create-pr/script.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/tea-create-pr/script.sh b/pkgs/tea-create-pr/script.sh index 3b4fbcf8e..87c7c219a 100755 --- a/pkgs/tea-create-pr/script.sh +++ b/pkgs/tea-create-pr/script.sh @@ -10,7 +10,6 @@ currentBranch="$(git rev-parse --abbrev-ref HEAD)" user_unparsed="$(tea whoami)" user="$(echo "$user_unparsed" | tr -d '\n' | cut -f4 -d' ')" tempRemoteBranch="$user-$currentBranch" -root_dir=$(git rev-parse --show-toplevel) # Function to check if a remote exists @@ -30,7 +29,7 @@ if ! check_remote "$remoteUpstream"; then exit 1 fi -treefmt --no-cache --fail-on-change -C "$root_dir" +nix fmt -- --fail-on-change --no-cache upstream_url=$(git remote get-url "$remoteUpstream") set -x @@ -42,7 +41,7 @@ repo=$(echo "$upstream_url" | sed -E 's#.*:([^/]+/[^.]+)\.git#\1#') git log --reverse --pretty="format:%s%n%n%b%n%n" "$remoteUpstream/$targetBranch..HEAD" > "$TMPDIR"/commit-msg -$EDITOR "$TMPDIR"/commit-msg +"$EDITOR" "$TMPDIR"/commit-msg COMMIT_MSG=$(cat "$TMPDIR"/commit-msg)