diff options
Diffstat (limited to 'lib/puppet/parser/functions/ensure_packages.rb')
-rw-r--r-- | lib/puppet/parser/functions/ensure_packages.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/puppet/parser/functions/ensure_packages.rb b/lib/puppet/parser/functions/ensure_packages.rb index 450ea02..371d63a 100644 --- a/lib/puppet/parser/functions/ensure_packages.rb +++ b/lib/puppet/parser/functions/ensure_packages.rb @@ -11,8 +11,7 @@ Takes a list of packages and only installs them if they don't already exist. raise(Puppet::ParseError, "ensure_packages(): Wrong number of arguments " + "given (#{arguments.size} for 1)") if arguments.size != 1 - raise(Puppet::ParseError, "ensure_packages(): Requires array " + - "given (#{arguments[0].class})") if !arguments[0].kind_of?(Array) + arguments[0] = [ arguments[0] ] unless arguments[0].kind_of?(Array) Puppet::Parser::Functions.function(:ensure_resource) arguments[0].each { |package_name| |