Method: Command::Open#call

Defined in:
lib/command/open.rb

#callObject



24
25
26
27
28
29
30
31
# File 'lib/command/open.rb', line 24

def call
  workload = config.options[:workload] || config[:one_off_workload]
  data = cp.fetch_workload!(workload)
  url = data["status"]["endpoint"]
  opener = Shell.cmd("which", "xdg-open", "open")[:output].split("\n").grep_v("not found").first

  Kernel.exec(opener, url)
end