Skip to content

Commit 9169d62

Browse files
committed
Fix leading dash in framework identifier generation
Ensures that any leading dashes are removed from the generated framework identifier in xcframework_utils.sh. Defaults to 'framework' if the identifier is empty after processing.
1 parent a3ec189 commit 9169d62

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/serious_python_darwin/darwin/xcframework_utils.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ create_xcframework_from_dylibs() {
5555
dylib_without_ext=$(echo $dylib_relative_path | cut -d "." -f 1)
5656
framework=$(echo $dylib_without_ext | tr "/" ".")
5757
framework_identifier=${framework//_/-}
58-
58+
while [[ $framework_identifier == -* ]]; do
59+
framework_identifier=${framework_identifier#-}
60+
done
61+
framework_identifier=${framework_identifier:-framework}
62+
5963
# creating "iphoneos" framework
6064
fd=iphoneos/$framework.framework
6165
mkdir -p $fd

0 commit comments

Comments
 (0)