Method: CF::CLI#precondition

Defined in:
lib/cf/cli.rb

#preconditionObject



87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/cf/cli.rb', line 87

def precondition
  check_target
  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