From 1614390496c30e8fc6f7daf28d5a9aad4cc3ea6b Mon Sep 17 00:00:00 2001 From: dabing1022 Date: Tue, 19 Jan 2021 20:09:52 +0800 Subject: [PATCH] fix: missing some kind of lib with AA-BB --- .../lib/cocoapods-imy-bin/helpers/build_utils.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cocoapods-imy-bin/lib/cocoapods-imy-bin/helpers/build_utils.rb b/cocoapods-imy-bin/lib/cocoapods-imy-bin/helpers/build_utils.rb index 3f5d557..7a29903 100755 --- a/cocoapods-imy-bin/lib/cocoapods-imy-bin/helpers/build_utils.rb +++ b/cocoapods-imy-bin/lib/cocoapods-imy-bin/helpers/build_utils.rb @@ -38,6 +38,11 @@ def Utils.spec_module_dir(spec) if spec.module_name.nil? module_dir = "./Headers/Public/#{spec.name}" module_dir = "./Pods/Headers/Public/#{spec.name}" unless File.exist?(module_dir) + unless File.exist?(module_dir) + # 一些库名称中使用了中划线如AAA-BBB,public header中库名称会默认处理成下划线AAA_BBB + module_name = spec.name.gsub("-", "_") + module_dir = "./Pods/Headers/Public/#{module_name}" + end else module_dir = "./Headers/Public/#{spec.module_name}" module_dir = "./Pods/Headers/Public/#{spec.module_name}" unless File.exist?(module_dir)