diff --git a/lib/puppet/provider/gnupg_key/gnupg.rb b/lib/puppet/provider/gnupg_key/gnupg.rb index 887e549..a92f2a8 100644 --- a/lib/puppet/provider/gnupg_key/gnupg.rb +++ b/lib/puppet/provider/gnupg_key/gnupg.rb @@ -53,7 +53,7 @@ def add_key end def add_key_from_key_server - if resource[:proxy].empty? + if resource[:proxy].nil? or resource[:proxy].empty? command = "gpg --keyserver #{resource[:key_server]} --recv-keys #{resource[:key_id]}" else command = "gpg --keyserver #{resource[:key_server]} --keyserver-options http-proxy=#{resource[:proxy]} --recv-keys #{resource[:key_id]}"