Skip to content

Commit

Permalink
Handle File resources with no parameters
Browse files Browse the repository at this point in the history
Fixes: NoMethodError: undefined method `key?' for nil:NilClass
  • Loading branch information
sathieu committed May 31, 2017
1 parent 34aca05 commit 52dfe61
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/octocatalog-diff/catalog-util/fileresources.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ def self._convert_file_resources(resources, compilation_dir, environment = 'prod
# @return [Boolean] True of resource is convertible, false if not
def self.resource_convertible?(resource)
return true if resource['type'] == 'File' && \
!resource['parameters'].nil? && \
resource['parameters'].key?('source') && \
!resource['parameters'].key?('content') && \
resource['parameters']['source'] =~ %r{^puppet:///modules/([^/]+)/(.+)}
Expand Down

0 comments on commit 52dfe61

Please sign in to comment.