summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorJohn Duarte <john.duarte@puppetlabs.com>2014-05-27 17:18:37 -0700
committerJohn Duarte <john.duarte@puppetlabs.com>2014-05-27 17:18:37 -0700
commit22397d9b36938f6537bc83293e5bee0aff403756 (patch)
tree5c65e3c3ab1f97caf998c658658166e36b351685 /Rakefile
parentb3b253f2432e5cda15c04b11b89bb3d47e84dc76 (diff)
Fix logic to validate keyfile
Diffstat (limited to 'Rakefile')
-rwxr-xr-xRakefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Rakefile b/Rakefile
index b1e0e14..cb80def 100755
--- a/Rakefile
+++ b/Rakefile
@@ -72,7 +72,7 @@ end
def check_args_for_keyfile(extra_args)
keyfile = ''
extra_args.each do |a|
- keyfile = a if (`file -b #{a}`.gsub(/\n/,"").match(/ key/))
+ keyfile = a unless (`ssh-keygen -l -f #{a}`.gsub(/\n/,"").match(/is not a .*key file/))
end
return keyfile
end