Skip to content

Commit

Permalink
Update accounts_ssh_authorized_keys_line_parser.rb
Browse files Browse the repository at this point in the history
I'm sorry, you are right. I fixed it.
  • Loading branch information
PorkCharsui79 authored May 12, 2022
1 parent 516b2df commit 230d072
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
end

def accounts_ssh_authorized_keys_line_parser_string(str)
matched = str.match(%r{((sk-ssh-ed25519-|sk-ecdsa-|ssh-|ecdsa-)[^\s]+)\s+([^\s]+)\s+(.*)$})
matched = str.match(%r{((sk-ssh-ed25519|sk-ecdsa-|ssh-|ecdsa-)[^\s]+)\s+([^\s]+)\s+(.*)$})
raise ArgumentError, 'Wrong Keyline format!' unless matched && matched.length == 5
options = str[0, str.index(matched[0])].rstrip
[options, matched[1], matched[3], matched[4]]
Expand Down

0 comments on commit 230d072

Please sign in to comment.