Skip to content

Commit

Permalink
Fix $RESOLVED_EXTERNAL_REPOSITORIES handling (#1535)
Browse files Browse the repository at this point in the history
Regressed with 6934eca.
  • Loading branch information
brentleyjones authored Jan 7, 2023
1 parent 3fcdbeb commit e568636
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions xcodeproj/internal/bazel_integration_files/create_lldbinit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,15 @@ echo "settings append target.source-map ./bazel-out/ \"$index_bazel_out\""
# `bazel-out` when set from swiftsourcefile
echo "settings append target.source-map ./bazel-out/ \"$build_bazel_out\""

# `external` for local repositories when set from Project navigator
while IFS='' read -r x; do external_repos+=("$x"); done < <(xargs -n1 <<< "${RESOLVED_EXTERNAL_REPOSITORIES:-}")
for (( i=0; i<${#external_repos[@]}; i+=2 )); do
dir_name="${external_repos[$i]}"
path="${external_repos[$i+1]}"
echo "settings append target.source-map \"./external/$dir_name\" \"$path\""
done
if [[ -n "${RESOLVED_EXTERNAL_REPOSITORIES:-}" ]]; then
# `external` for local repositories when set from Project navigator
while IFS='' read -r x; do external_repos+=("$x"); done < <(xargs -n1 <<< "$RESOLVED_EXTERNAL_REPOSITORIES")
for (( i=0; i<${#external_repos[@]}; i+=2 )); do
dir_name="${external_repos[$i]}"
path="${external_repos[$i+1]}"
echo "settings append target.source-map \"./external/$dir_name\" \"$path\""
done
fi

# `external` when set from Project navigator
echo "settings append target.source-map ./external/ \"$BAZEL_EXTERNAL\""
Expand Down

0 comments on commit e568636

Please sign in to comment.