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