Skip to content
Snippets Groups Projects
Commit 4f8e91fa authored by Robert Speicher's avatar Robert Speicher
Browse files

Merge branch 'dup-frozen-argv-key' into 'master'

In order to use chomp! on the input later, we need to dup the ARGV input string for keys

Also updated the gitlab_key tests to freeze the ARGV variables.

Fixes https://gitlab.com/gitlab-org/gitlab-shell/issues/56

See merge request !84
parents 627b29c5 939cd374
No related branches found
No related tags found
1 merge request!84In order to use chomp! on the input later, we need to dup the ARGV input string for keys
Pipeline #
Loading
Loading
@@ -22,7 +22,8 @@ class GitlabKeys
def initialize
@command = ARGV.shift
@key_id = ARGV.shift
@key = ARGV.shift
key = ARGV.shift
@key = key.dup if key
@auth_file = GitlabConfig.new.auth_file
end
 
Loading
Loading
Loading
Loading
@@ -284,7 +284,7 @@ describe GitlabKeys do
 
def argv(*args)
args.each_with_index do |arg, i|
ARGV[i] = arg
ARGV[i] = arg.freeze
end
end
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment