Exception: DreamOps::ChefJsonNotFoundError

Inherits:
DreamOpsError
  • Object
show all
Defined in:
lib/dream-ops/errors.rb

Instance Method Summary collapse

Methods inherited from DreamOpsError

set_status_code

Constructor Details

#initialize(target) ⇒ ChefJsonNotFoundError

Returns a new instance of ChefJsonNotFoundError.



122
123
124
# File 'lib/dream-ops/errors.rb', line 122

def initialize(target)
  @target = target
end

Instance Method Details

#to_sObject



126
127
128
129
130
131
132
# File 'lib/dream-ops/errors.rb', line 126

def to_s
  [
    "Could not find /var/chef/chef.json \"#{@target}\". To initialize with an empty runlist, run:",
    "",
    "dream init solo -t #{@target} -i #{DreamOps.ssh_key}",
  ].join("\n")
end