lib/bolt/applicator.rb in bolt-2.27.0 vs lib/bolt/applicator.rb in bolt-2.28.0

- old
+ new

@@ -48,19 +48,19 @@ end end def catalog_apply_task @catalog_apply_task ||= begin - path = File.join(libexec, 'apply_catalog.rb') - file = { 'name' => 'apply_catalog.rb', 'path' => path } - metadata = { 'supports_noop' => true, 'input_method' => 'stdin', - 'implementations' => [ - { 'name' => 'apply_catalog.rb' }, - { 'name' => 'apply_catalog.rb', 'remote' => true } - ] } - Bolt::Task.new('apply_helpers::apply_catalog', metadata, [file]) - end + path = File.join(libexec, 'apply_catalog.rb') + file = { 'name' => 'apply_catalog.rb', 'path' => path } + metadata = { 'supports_noop' => true, 'input_method' => 'stdin', + 'implementations' => [ + { 'name' => 'apply_catalog.rb' }, + { 'name' => 'apply_catalog.rb', 'remote' => true } + ] } + Bolt::Task.new('apply_helpers::apply_catalog', metadata, [file]) + end end def query_resources_task @query_resources_task ||= begin path = File.join(libexec, 'query_resources.rb') @@ -97,14 +97,14 @@ # If bolt_catalog does not return valid JSON, we should print stderr to # see what happened print_logs = stat.success? result = begin - JSON.parse(out) - rescue JSON::ParserError - print_logs = true - { 'message' => "Something's gone terribly wrong! STDERR is logged." } - end + JSON.parse(out) + rescue JSON::ParserError + print_logs = true + { 'message' => "Something's gone terribly wrong! STDERR is logged." } + end # Any messages logged by Puppet will be on stderr as JSON hashes, so we # parse those and store them here. Any message on stderr that is not # properly JSON formatted is assumed to be an error message. If # compilation was successful, we print the logs as they may include