Skip to content

Commit

Permalink
Fixes the source path of frameworks
Browse files Browse the repository at this point in the history
This commit fixes an issue where `Pods-TARGET_NAME-frameworks.sh` could give a `source: unbound variable` error.
  • Loading branch information
olliwang committed Mar 27, 2023
1 parent df6cd9e commit b2d87b7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/cocoapods/generator/embed_frameworks_script.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,15 @@ def script
# Copies and strips a vendored framework
install_framework()
{
local basename
basename="$(basename -s .framework "$1")"
if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
local source="${BUILT_PRODUCTS_DIR}/$1"
elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then
local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")"
elif [ -r "${PODS_CONFIGURATION_BUILD_DIR}/${basename}/$(basename "$1")" ]; then
local source="${PODS_CONFIGURATION_BUILD_DIR}/${basename}/$(basename "$1")"
elif [ -r "$1" ]; then
local source="$1"
fi
Expand All @@ -100,8 +105,6 @@ def script
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \\"- CVS/\\" --filter \\"- .svn/\\" --filter \\"- .git/\\" --filter \\"- .hg/\\" --filter \\"- Headers\\" --filter \\"- PrivateHeaders\\" --filter \\"- Modules\\" \\"${source}\\" \\"${destination}\\""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
local basename
basename="$(basename -s .framework "$1")"
binary="${destination}/${basename}.framework/${basename}"
if ! [ -r "$binary" ]; then
Expand Down

0 comments on commit b2d87b7

Please sign in to comment.