Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use local scoped variables #710

Merged
merged 1 commit into from Oct 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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