fixed unbound variable

This commit is contained in:
Tonye Jack 2022-11-23 18:03:33 -07:00
parent e54a2423a8
commit bcd97d2870

View File

@ -79,7 +79,7 @@ function get_diff() {
done < <(git submodule | awk '{print $2}')
if [[ "$INPUT_DIR_NAMES" == "true" ]]; then
git diff --diff-filter="$filter" --name-only --ignore-submodules=all "$base$DIFF$sha" | xargs -I {} dirname {} | dirname_max_depth | uniq && exit_status=$? || exit_status=$?
git diff --diff-filter="$filter" --name-only --ignore-submodules=all "$base$DIFF$sha" | xargs -I {} dirname {} | xargs -I {} dirname_max_depth {} | xargs -I {} uniq {} && exit_status=$? || exit_status=$?
if [[ $exit_status -ne 0 ]]; then
echo "::error::Failed to get changed directories between: $base$DIFF$sha"
@ -123,7 +123,7 @@ 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" || true; } | awk -F '\t' -v d="$INPUT_OLD_NEW_SEPARATOR" '{print $2d$3}' | xargs -I {} dirname {} | dirname_max_depth | 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 {} | xargs -I {} dirname_max_depth {} | xargs -I {} uniq {} && exit_status=$? || exit_status=$?
if [[ $exit_status -ne 0 ]]; then
echo "::error::Failed to get renamed directories between: $base$sha"