aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2010-12-16 17:15:36 +0100
committermh <mh@immerda.ch>2010-12-16 17:15:36 +0100
commit584cee72362cf5b2d822164ef6569fe4671eabf6 (patch)
tree2b600b480bba9622ab704baf9cdee7801de442a3
parent93fabb2021f97f570cc2c8d48c7e7a425f7a1605 (diff)
downloadpuppet-sshd-584cee72362cf5b2d822164ef6569fe4671eabf6.tar.gz
puppet-sshd-584cee72362cf5b2d822164ef6569fe4671eabf6.tar.bz2
made error mesage a bit more verbose
-rw-r--r--lib/puppet/parser/functions/ssh_keygen.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/parser/functions/ssh_keygen.rb b/lib/puppet/parser/functions/ssh_keygen.rb
index 18b006a..24efe62 100644
--- a/lib/puppet/parser/functions/ssh_keygen.rb
+++ b/lib/puppet/parser/functions/ssh_keygen.rb
@@ -6,7 +6,7 @@ Puppet::Parser::Functions::newfunction(:ssh_keygen, :type => :rvalue, :doc =>
It accepts only fully qualified paths, everything else will fail.") do |args|
raise Puppet::ParseError, "Wrong number of arguments" unless args.to_a.length == 1
private_key_path = args
- raise Puppet::ParseError, "Only fully qualified paths are accepted" unless private_key_path =~ /^\/.+/
+ raise Puppet::ParseError, "Only fully qualified paths are accepted (#{private_key_path})" unless private_key_path =~ /^\/.+/
public_key_path = "#{private_key_path}.pub"
raise Puppet::ParseError, "Either only the private or only the public key exists" if File.exists?(private_key_path) ^ File.exists?(public_key_path)
[private_key_path,public_key_path].each do |path|