Class: Packer::Output::Fix

Inherits:
Base
  • Object
show all
Defined in:
lib/packer/output/fix.rb

Overview

Represents the output from packer fix.

Instance Method Summary collapse

Methods inherited from Base

#initialize, #stderr, #stdout

Constructor Details

This class inherits a constructor from Packer::Output::Base

Instance Method Details

#jsonString

JSON representing the fixed template or nil if the fixing fails or the template is not valid.

Returns:

  • (String)


11
12
13
14
15
# File 'lib/packer/output/fix.rb', line 11

def json
  return nil unless valid?

  stdout
end

#valid?Boolean

Returns true if the fixing was successful and the template is valid.

Returns:

  • (Boolean)


20
21
22
# File 'lib/packer/output/fix.rb', line 20

def valid?
  @output.exitstatus.zero?
end