From 6ba122ced41524a95484a3f3ebc595ea0a543a01 Mon Sep 17 00:00:00 2001 From: toofar Date: Thu, 8 Dec 2022 08:40:30 +1300 Subject: fix cache to handle multiple tool runs The cache for changes due to pyupgrade aren't the same from "pyupgrade" as "black pyupgrade", so include the full set of commands in the cache path. Unfortunately that makes the cache less useful across different configurations, but hopefully it still helps me when developing this. --- scripts/check_mergability.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/check_mergability.sh b/scripts/check_mergability.sh index cc432c530..1e8affc89 100755 --- a/scripts/check_mergability.sh +++ b/scripts/check_mergability.sh @@ -249,7 +249,7 @@ rebase_with_formatting () { # it. cmds="$cmds" -inputf="\$(mktemp)" +inputf="\$(mktemp --suffix=rebase)" cat > "\$inputf" # TODO: de-dup these with the parent script? @@ -265,8 +265,8 @@ run_with_cache () { cmd="\$2" input_hash="\$(sha1sum "\$inputf" | cut -d' ' -f1)" - mkdir -p /tmp/filter-caches/\$cmd 2>/dev/null - outputf=/tmp/filter-caches/\$cmd/\$input_hash + mkdir -p "/tmp/filter-caches/\$cmds/\$cmd" 2>/dev/null + outputf="/tmp/filter-caches/\$cmds/\$cmd/\$input_hash" [ -e "\$outputf" ] || \$cmd < "\$inputf" > "\$outputf" -- cgit v1.2.3-54-g00ecf