Sha256: b06351ce80081c67295225dada45e17690eacf3009aba956d3c9be78dc8c0432
Contents?: true
Size: 706 Bytes
Versions: 7
Compression:
Stored size: 706 Bytes
Contents
require 'fileutils' module Kontena module Machine module Vagrant class MasterDestroyer include Kontena::Cli::ShellSpinner def run! vagrant_path = "#{Dir.home}/.kontena/vagrant_master" Dir.chdir(vagrant_path) do spinner "Terminating Kontena Master from Vagrant " do Open3.popen2('vagrant destroy -f') do |stdin, output, wait| while o = output.gets puts o if ENV['DEBUG'] end if wait.value == 0 FileUtils.remove_entry_secure(vagrant_path) end end end end end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems