Module: LoginRequirements

Included in:
CF::App::Base, CF::Domain::Base, CF::Populators::Base, CF::Route::Base, CF::Service::Base
Defined in:
lib/cf/cli/login_requirements.rb

Instance Method Summary collapse

Instance Method Details

#preconditionObject



2
3
4
5
6
7
8
9
10
11
12
# File 'lib/cf/cli/login_requirements.rb', line 2

def precondition
  check_logged_in

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

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