Method: VMC::App::Start#start

Defined in:
lib/vmc/cli/app/start.rb

#startObject



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/vmc/cli/app/start.rb', line 13

def start
  apps = input[:all] ? client.apps : input[:apps]
  fail "No applications given." if apps.empty?

  spaced(apps) do |app|
    app = filter(:start_app, app)

    switch_mode(app, input[:debug_mode])

    if app.started?
      err "Application #{b(app.name)} is already started."
      next
    end

    log = start_app(app)
    stream_start_log(log) if log
    check_application(app)

    if app.debug_mode && !quiet?
      line
      invoke :instances, :app => app
    end
  end
end