Commit 8c78ecf1 authored by Marius Rackwitz's avatar Marius Rackwitz

Implemented check if all requested Pods are installed

parent 40bed656
......@@ -99,7 +99,14 @@ module Pod
if @pods
verify_lockfile_exists!
# TODO: Check if all given pods are installed unless no pods are given
# Check if all given pods are installed
missing_pods = @pods.select { |pod| !config.lockfile.pod_names.include?(pod) }
if missing_pods.length > 0
raise Informative, (missing_pods.length > 1 \
? "Pods %s are not installed and cannot be updated" \
: "Pod %s is not installed and cannot be updated"
) % missing_pods.map { |p| "`#{p}'" }.join(', ')
end
run_install_with_update(pods: @pods)
else
......
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