diff --git a/get-modified-packages/get-modified-packages.sh b/get-modified-packages/get-modified-packages.sh index e852b626..b7fa2070 100755 --- a/get-modified-packages/get-modified-packages.sh +++ b/get-modified-packages/get-modified-packages.sh @@ -48,10 +48,11 @@ function find_package_dir() { return 1 } -# Find modified files from base branch -modified_files=$(git diff --name-only "$base_branch"...HEAD) +# Find modified files from the base branch +modified_files=$(git diff --name-only "$base_branch"...HEAD 2>&1) 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" + echo -e "\e[31mGit diff error details: $modified_files\e[m" # This will display the original git error exit 1 fi