Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prune_cache is pruning folder that doesn't exist. #1

Closed
orta opened this issue Mar 2, 2013 · 1 comment
Closed

prune_cache is pruning folder that doesn't exist. #1

orta opened this issue Mar 2, 2013 · 1 comment

Comments

@orta
Copy link
Member

orta commented Mar 2, 2013

I'm downloading with these options { :git => "https://github.com/0xced/ABGetMe.git", :tag => "1.0.0" } and the gem is correctly cloning but at the end its trying to access a folder that doesn't exist.

Screen Shot 2013-03-02 at 14 27 35

spec = eval( File.open(podfile_file_path).read )
download_location = current_dir + "/download/#{spec.name}/#{spec.version}"

unless File.exists? download_location
  downloader = Pod::Downloader.for_target(download_location, spec.source)
  downloader.cache_root = ''
  downloader.max_cache_size = 500
  downloader.download  
end
Updating cache git repo (/Volumes/Cache/orta/spiel/html/cocoadocs-host/GitHub/40a05edf506a6dcfcce5f1353a001b55f4467cd9)
Fetching origin
Initialized empty Git repository in /Volumes/Cache/orta/spiel/html/cocoadocs-host/download/ABGetMe/1.0.0/.git/

From /Volumes/Cache/orta/spiel/html/cocoadocs-host/GitHub/40a05edf506a6dcfcce5f1353a001b55f4467cd9
 * tag               1.0.0      -> FETCH_HEAD
HEAD is now at 8d8d7ca Add MIT license file
Switched to a new branch 'activated-pod-commit'
/Volumes/Cache/orta/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/pathname.rb:397:in `open': No such file or directory - /Volumes/Cache/orta/spiel/html/cocoadocs-host/GitHub/GitHub (Errno::ENOENT)
    from /Volumes/Cache/orta/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/pathname.rb:397:in `foreach'
    from /Volumes/Cache/orta/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/pathname.rb:397:in `children'
    from /Volumes/Cache/orta/.rvm/gems/ruby-1.9.3-p385/gems/cocoapods-downloader-0.1.0/lib/cocoapods-downloader/base.rb:185:in `block in prune_cache'
    from /Volumes/Cache/orta/.rvm/gems/ruby-1.9.3-p385/gems/cocoapods-downloader-0.1.0/lib/cocoapods-downloader/base.rb:184:in `chdir'
    from /Volumes/Cache/orta/.rvm/gems/ruby-1.9.3-p385/gems/cocoapods-downloader-0.1.0/lib/cocoapods-downloader/base.rb:184:in `prune_cache'
    from /Volumes/Cache/orta/.rvm/gems/ruby-1.9.3-p385/gems/cocoapods-downloader-0.1.0/lib/cocoapods-downloader/base.rb:102:in `block in download'
    from /Volumes/Cache/orta/.rvm/gems/ruby-1.9.3-p385/gems/cocoapods-downloader-0.1.0/lib/cocoapods-downloader/api.rb:43:in `ui_action'
    from /Volumes/Cache/orta/.rvm/gems/ruby-1.9.3-p385/gems/cocoapods-downloader-0.1.0/lib/cocoapods-downloader/base.rb:99:in `download'
    from Rakefile:26:in `<main>'
@fabiopelosin
Copy link
Member

This line https://github.com/CocoaPods/cocoapods-downloader/blob/master/lib/cocoapods-downloader/base.rb#L160 should be updated to something like:

Pathname.new(File.expand_path(Pathname.pwd + cache_root)) + name

baxievski referenced this issue in baxievski/cocoapods-downloader Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants