Skip to content

Commit

Permalink
Avoid string mutation
Browse files Browse the repository at this point in the history
For Ruby 3.4
  • Loading branch information
matjack1 committed Nov 22, 2024
1 parent 3fa9cd5 commit e31b985
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/kamal/commands/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,13 @@ def ssh_proxy_args
end

def ssh_keys_args
args = ""
config.ssh.keys&.each do |key|
args << " -i #{key}"
"#{ ssh_keys.join("") if ssh_keys}" + "#{" -o IdentitiesOnly=yes" if config.ssh&.keys_only}"
end

def ssh_keys
config.ssh.keys&.map do |key|
" -i #{key}"
end
args << " -o IdentitiesOnly=yes" if config.ssh&.keys_only
args
end
end
end

0 comments on commit e31b985

Please sign in to comment.