Skip to content

Commit

Permalink
fix: Issue #79
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoweibing committed Jan 11, 2021
1 parent 1c491b0 commit 74dc62e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.DS_Store
.idea/
11 changes: 8 additions & 3 deletions cocoapods-imy-bin/lib/cocoapods-imy-bin/command/bin/auto.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,14 @@ def initialize(argv)
super
end

def validate!
help! "未找到 podspec文件" unless @podspec
super
end

def run
@specification = Specification.from_file(@podspec)

unless @podspec
raise Informative, "未找到 podspec文件"
end
sources_sepc = run_archive

fail_push_specs = []
Expand Down Expand Up @@ -175,6 +178,7 @@ def spec_file

#Dir.glob 可替代
def find_podspec
name = nil
Pathname.pwd.children.each do |child|
puts child
if File.file?(child)
Expand All @@ -185,6 +189,7 @@ def find_podspec
end
end
end
return name
end
end

Expand Down

0 comments on commit 74dc62e

Please sign in to comment.