module LoginRequirements

Public Instance Methods

precondition() click to toggle source
# File lib/cf/cli/login_requirements.rb, line 2
def precondition
  check_logged_in

  unless client.current_organization
    fail "Please select an organization with 'truck target --organization ORGANIZATION_NAME'. (Get organization names from 'truck orgs'.)"
  end

  unless client.current_space
    fail "Please select a space with 'truck target --space SPACE_NAME'. (Get space names from 'truck spaces'.)"
  end
end