Skip to content

Commit

Permalink
Merge pull request #710 from tj-actions/chore/use-local-scoped-variables
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Oct 25, 2022
2 parents af3b754 + 995ead5 commit c4d29bf
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions get-changed-paths.sh
Expand Up @@ -25,9 +25,10 @@ if [[ -n $INPUT_DIFF_RELATIVE ]]; then
fi

function get_diff() {
base="$1"
sha="$2"
filter="$3"
local base="$1"
local sha="$2"
local filter="$3"

while IFS='' read -r sub; do
sub_commit_pre="$(git diff "$base$DIFF$sha" -- "$sub" | grep '^[-]Subproject commit' | awk '{print $3}')" && exit_status=$? || exit_status=$?
if [[ $exit_status -ne 0 ]]; then
Expand Down Expand Up @@ -69,8 +70,9 @@ function get_diff() {
}

function get_renames() {
base="$1"
sha="$2"
local base="$1"
local sha="$2"

while IFS='' read -r sub; do
sub_commit_pre="$(git diff "$base$DIFF$sha" -- "$sub" | grep '^[-]Subproject commit' | awk '{print $3}')" && exit_status=$? || exit_status=$?
if [[ $exit_status -ne 0 ]]; then
Expand Down

0 comments on commit c4d29bf

Please sign in to comment.