Skip to content

Commit

Permalink
Fixed the test
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Nov 3, 2022
1 parent be35464 commit 7d07168
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions get-changed-paths.sh
Expand Up @@ -97,14 +97,14 @@ function get_renames() {
done < <(git submodule | awk '{print $2}')

if [[ "$INPUT_DIR_NAMES" == "true" ]]; then
git log --name-status --ignore-submodules=all "$base" "$sha" | grep -E "^R" | awk -F '\t' -v d="$INPUT_OLD_NEW_SEPARATOR" '{print $2d$3}' | xargs -I {} dirname {} | uniq && exit_status=$? || exit_status=$?
git log --name-status --ignore-submodules=all "$base" "$sha" | { grep -E "^R" || true; } | awk -F '\t' -v d="$INPUT_OLD_NEW_SEPARATOR" '{print $2d$3}' | xargs -I {} dirname {} | uniq && exit_status=$? || exit_status=$?

if [[ $exit_status -ne 0 ]]; then
echo "::error::Failed to get renamed directories between: $base$sha"
exit 1
fi
else
git log --name-status --ignore-submodules=all "$base" "$sha" | grep -E "^R" | awk -F '\t' -v d="$INPUT_OLD_NEW_SEPARATOR" '{print $2d$3}' && exit_status=$? || exit_status=$?
git log --name-status --ignore-submodules=all "$base" "$sha" | { grep -E "^R" || true; } | awk -F '\t' -v d="$INPUT_OLD_NEW_SEPARATOR" '{print $2d$3}' && exit_status=$? || exit_status=$?

if [[ $exit_status -ne 0 ]]; then
echo "::error::Failed to get renamed files between: $base$sha"
Expand Down

0 comments on commit 7d07168

Please sign in to comment.