diff options
Diffstat (limited to 'lib/chef/version_class.rb')
-rw-r--r-- | lib/chef/version_class.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/chef/version_class.rb b/lib/chef/version_class.rb index e9879274ad..36ff05a46d 100644 --- a/lib/chef/version_class.rb +++ b/lib/chef/version_class.rb @@ -60,6 +60,8 @@ class Chef [ $1.to_i, $2.to_i, $3.to_i ] when /^(\d+)\.(\d+)$/ [ $1.to_i, $2.to_i, 0 ] + when /^(\d+)$/ + [ $1.to_i, 0, 0 ] else msg = "'#{str.to_s}' does not match 'x.y.z' or 'x.y'" raise Chef::Exceptions::InvalidCookbookVersion.new( msg ) |