Commit 371f7bae authored by Eloy Durán's avatar Eloy Durán

Allow the analyzer to do its work without updating sources.

This is needed for: https://github.com/HipByte/motion-cocoapods/pull/50
parent 80de2e3f
...@@ -45,14 +45,14 @@ module Pod ...@@ -45,14 +45,14 @@ module Pod
# #
# @return [AnalysisResult] # @return [AnalysisResult]
# #
def analyze def analyze(allow_fetches = true)
update_repositories_if_needed update_repositories_if_needed if allow_fetches
@result = AnalysisResult.new @result = AnalysisResult.new
@result.podfile_state = generate_podfile_state @result.podfile_state = generate_podfile_state
@locked_dependencies = generate_version_locking_dependencies @locked_dependencies = generate_version_locking_dependencies
@result.libraries = generated_libraries @result.libraries = generated_libraries
fetch_external_sources fetch_external_sources if allow_fetches
@result.specs_by_target = resolve_dependencies @result.specs_by_target = resolve_dependencies
@result.specifications = generate_specifications @result.specifications = generate_specifications
@result.sandbox_state = generate_sandbox_state @result.sandbox_state = generate_sandbox_state
...@@ -79,7 +79,9 @@ module Pod ...@@ -79,7 +79,9 @@ module Pod
# @return [Bool] Whether the sandbox is in synch with the lockfile. # @return [Bool] Whether the sandbox is in synch with the lockfile.
# #
def sandbox_needs_install? def sandbox_needs_install?
lockfile != sandbox.manifest state = generate_sandbox_state
needing_install = state.added + state.changed + state.deleted
!needing_install.empty?
end end
#-----------------------------------------------------------------------# #-----------------------------------------------------------------------#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment