Skip to content

Commit 22397d9

Browse files
author
John Duarte
committed
Fix logic to validate keyfile
1 parent b3b253f commit 22397d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ end
7272
def check_args_for_keyfile(extra_args)
7373
keyfile = ''
7474
extra_args.each do |a|
75-
keyfile = a if (`file -b #{a}`.gsub(/\n/,"").match(/ key/))
75+
keyfile = a unless (`ssh-keygen -l -f #{a}`.gsub(/\n/,"").match(/is not a .*key file/))
7676
end
7777
return keyfile
7878
end

0 commit comments

Comments
 (0)