Skip to content

Commit

Permalink
print error message
Browse files Browse the repository at this point in the history
Signed-off-by: M. Fatih Cırıt <[email protected]>
  • Loading branch information
M. Fatih Cırıt committed Jun 12, 2024
1 parent f82ef22 commit 58e5cd4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions get-modified-packages/get-modified-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ function find_package_dir() {
}

# Find modified files from base branch
modified_files=$(git diff --name-only "$base_branch"...HEAD) || {
modified_files=$(git diff --name-only "$base_branch"...HEAD)
if [ $? -ne 0 ]; then
echo -e "\e[31mFailed to determine modified files. Please check if the base branch exists and fetch depth is sufficient.\e[m"
exit 1
}
fi

# Find modified packages
modified_package_dirs=()
Expand Down

0 comments on commit 58e5cd4

Please sign in to comment.