summaryrefslogtreecommitdiff
path: root/lib/chef/resource
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-04-14 11:30:40 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2016-04-14 11:30:40 -0700
commit03503d7352ccad45107b055fc711e86c7c5d2918 (patch)
tree22b44530ad934d4846167021b2485abf45fb8110 /lib/chef/resource
parent95c13caaf4c8a20ba6d1f49680cd23de60cdb231 (diff)
downloadchef-03503d7352ccad45107b055fc711e86c7c5d2918.tar.gz
add nillable apt_repository and nillable properties
in Chef-13 nillable will become 'true' by default and we'll have to deprecate and remove all nillable properties, but for now this lets us opt-in, which was can't currently do in Chef-12.
Diffstat (limited to 'lib/chef/resource')
-rw-r--r--lib/chef/resource/apt_repository.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/resource/apt_repository.rb b/lib/chef/resource/apt_repository.rb
index e1ea665858..bba753638c 100644
--- a/lib/chef/resource/apt_repository.rb
+++ b/lib/chef/resource/apt_repository.rb
@@ -26,7 +26,7 @@ class Chef
property :repo_name, String, name_property: true
property :uri, String
- property :distribution, String, default: lazy { node["lsb"]["codename"] }
+ property :distribution, [ String, nil ], default: lazy { node["lsb"]["codename"] }, nillable: true
property :components, Array, default: []
property :arch, [String, nil], default: nil
property :trusted, [TrueClass, FalseClass], default: false