diff --git a/.github/actions/restore-node/action.yml b/.github/actions/restore-node/action.yml index a1e17d50f60d..8fdd666edf15 100644 --- a/.github/actions/restore-node/action.yml +++ b/.github/actions/restore-node/action.yml @@ -133,7 +133,7 @@ runs: if ! cmp -s <(git cat-file blob HEAD:package.json) package.json; then # In the event that the package.json has been modified by Endo - # replacements, We need to generate a yarn-installed.sum that matches + # replacements, we need to have a yarn-installed.sum that matches # the unmodified package.json. As long as we don't explicitly `yarn # install` anywhere other than in this action and in the bin/agd # script, we should be able to reuse even Endo-overridden built caches @@ -145,10 +145,14 @@ runs: stamp=$1 shift find ${1+"$@"} -exec sha1sum {} \; | sort +1 > "$stamp.new" || true - if test ! -s "$stamp.new" -a ! -e "$stamp"; then - echo "No dependencies found for $stamp" 1>&2 + if test ! -s "$stamp.new"; then + echo "No new dependencies found for $stamp" 1>&2 return 0 fi + if test ! -e "$stamp"; then + echo "No cached dependencies found for $stamp" 1>&2 + return 1 + fi diff -u "$stamp" "$stamp.new" || return 1 return 0 } diff --git a/bin/agd b/bin/agd index f111f7adde32..02ad93b65436 100755 --- a/bin/agd +++ b/bin/agd @@ -23,10 +23,14 @@ function diffsha1() { stamp=$1 shift find ${1+"$@"} -exec sha1sum {} \; | sort +1 > "$stamp.new" || true - if test ! -s "$stamp.new" -a ! -e "$stamp"; then - echo "No dependencies found for $stamp" 1>&2 + if test ! -s "$stamp.new"; then + echo "No new dependencies found for $stamp" 1>&2 return 0 fi + if test ! -e "$stamp"; then + echo "No cached dependencies found for $stamp" 1>&2 + return 1 + fi diff -u "$stamp" "$stamp.new" || return 1 return 0 }