mirror of
https://github.com/capistrano/capistrano
synced 2023-03-27 23:21:18 -04:00
avoid pushing duplicate keys
This commit is contained in:
parent
bdcc14b8e5
commit
90c599e1a5
1 changed files with 2 additions and 2 deletions
|
@ -35,7 +35,7 @@ module Capistrano
|
|||
end
|
||||
|
||||
def set(key, value=nil, &block)
|
||||
@trusted_keys << key if trusted?
|
||||
@trusted_keys << key if trusted? && !@trusted_keys.include?(key)
|
||||
remember_location(key)
|
||||
values[key] = block || value
|
||||
trace_set(key)
|
||||
|
@ -43,7 +43,7 @@ module Capistrano
|
|||
end
|
||||
|
||||
def fetch(key, default=nil, &block)
|
||||
fetched_keys << key
|
||||
fetched_keys << key unless fetched_keys.include?(key)
|
||||
peek(key, default, &block)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue