]> gitweb.fluxo.info Git - puppet-sshd.git/commitdiff
made error mesage a bit more verbose
authormh <mh@immerda.ch>
Thu, 16 Dec 2010 16:15:36 +0000 (17:15 +0100)
committermh <mh@immerda.ch>
Thu, 16 Dec 2010 16:15:36 +0000 (17:15 +0100)
lib/puppet/parser/functions/ssh_keygen.rb

index 18b006a4f05dc4f503ce10f8cf86cdc72fef8db1..24efe62c4bd60ced37d53b99885b4336867b45ce 100644 (file)
@@ -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|