Module: Vagrant::Util::Caps::BuildISO
- Defined in:
- lib/vagrant/util/caps.rb
Instance Method Summary collapse
-
#build_iso(iso_command, source_directory, file_destination) ⇒ Object
Builds an iso given a compatible iso_command.
Instance Method Details
#build_iso(iso_command, source_directory, file_destination) ⇒ Object
Builds an iso given a compatible iso_command
20 21 22 23 24 25 26 27 28 |
# File 'lib/vagrant/util/caps.rb', line 20 def build_iso(iso_command, source_directory, file_destination) FileUtils.mkdir_p(file_destination.dirname) if !file_destination.exist? || Vagrant::Util::Directory.directory_changed?(source_directory, file_destination.mtime) result = Vagrant::Util::Subprocess.execute(*iso_command) if result.exit_code != 0 raise Vagrant::Errors::ISOBuildFailed, cmd: iso_command.join(" "), stdout: result.stdout, stderr: result.stderr end end end |