File tree Expand file tree Collapse file tree
lib/octocatalog-diff/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -234,7 +234,7 @@ def build_catalog(opts, logger = @logger)
234234 def catalog_validator ( catalog = nil , _logger = @logger , args = { } )
235235 return false unless catalog . is_a? ( OctocatalogDiff ::Catalog )
236236 catalog . validate_references if args [ :task ] == :to
237- return if catalog . valid?
237+ return true if catalog . valid?
238238 raise OctocatalogDiff ::Errors ::CatalogError , 'Catalog failed: Invalid catalog'
239239 end
240240 end
Original file line number Diff line number Diff line change @@ -170,15 +170,13 @@ def self.execute_task(task, logger)
170170 result = Result . new ( output : output , status : true , args : task . args )
171171 rescue => exc
172172 logger . debug ( "Failed #{ task . description } : #{ exc . class } #{ exc . message } " )
173- result = Result . new ( exception : exc , status : false , args : task . args )
173+ return Result . new ( exception : exc , status : false , args : task . args )
174174 end
175175
176176 begin
177- successful_validation = task . validate ( output , logger )
178- if successful_validation
177+ if task . validate ( output , logger )
179178 logger . debug ( "Success #{ task . description } " )
180179 else
181- logger . warn ( "Failed #{ task . description } validation" )
182180 raise "Failed #{ task . description } validation (unspecified error)"
183181 end
184182 rescue => exc
You can’t perform that action at this time.
0 commit comments