Skip to content

Commit

Permalink
fail if fetch-depth is insufficient
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 7f11795 commit 7dd28b6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion get-modified-packages/get-modified-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ 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) || {
echo -e "\e[31mFailed to determine modified files. Please check if the base branch exists and fetch depth is sufficient.\e[m"
exit 1
}

# Find modified packages
modified_package_dirs=()
Expand Down

0 comments on commit 7dd28b6

Please sign in to comment.