Class: VagrantPlugins::TrellisSequel::Command::Open

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant_plugins/trellis_sequel/command/open.rb

Instance Method Summary collapse

Instance Method Details

#executeObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/vagrant_plugins/trellis_sequel/command/open.rb', line 11

def execute
  options, argv = parse_options!

  with_target_vms(argv) do |machine|
    raise Vagrant::Errors::SSHNotReady unless machine.communicate.ready?

    Spf.create_and_open(
      data: {
        database: database_for(machine_root_path: machine.env.root_path, **options),
        ssh: ssh_for(machine)
      },
      path: machine.env.tmp_path
    )
  end

  # Always exit with success
  0
end