Don't modify original config object
Use `Marshal` to avoid mutating the original copy of the storage config.
This commit is contained in:
parent
e29a335bd2
commit
53a378fb7f
|
@ -163,7 +163,8 @@ module Gitaly
|
|||
|
||||
# Validate that no storages are sharing the same path.
|
||||
def check_duplicate_storage_paths
|
||||
storages = Gitlab['gitaly']['configuration']['storage'].dup
|
||||
# Deep copy storages to avoid mutating the original.
|
||||
storages = Marshal.load(Marshal.dump(Gitlab['gitaly']['configuration']['storage']))
|
||||
|
||||
storages.each do |storage|
|
||||
storage[:realpath] =
|
||||
|
|
Loading…
Reference in New Issue