summaryrefslogtreecommitdiff
path: root/lib/gitlab/backend/shell.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/backend/shell.rb')
-rw-r--r--lib/gitlab/backend/shell.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab/backend/shell.rb b/lib/gitlab/backend/shell.rb
index 14ee4701e7b..01b8bda05c6 100644
--- a/lib/gitlab/backend/shell.rb
+++ b/lib/gitlab/backend/shell.rb
@@ -4,7 +4,8 @@ module Gitlab
class KeyAdder < Struct.new(:io)
def add_key(id, key)
- io.puts("#{id}\t#{key.strip}")
+ key.gsub!(/[[:space:]]+/, ' ').strip!
+ io.puts("#{id}\t#{key}")
end
end