Skip to content

Commit 4d5e240

Browse files
committed
Do deep duplication of default ignores
1 parent e6dbe2d commit 4d5e240

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/octocatalog-diff/cli.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
require_relative 'cli/printer'
88
require_relative 'errors'
99
require_relative 'util/catalogs'
10+
require_relative 'util/util'
1011
require_relative 'version'
1112

1213
require 'logger'
@@ -53,7 +54,7 @@ class Cli
5354
# @return [Integer] Exit code: 0=no diffs, 1=something went wrong, 2=worked but there are diffs
5455
def self.cli(argv = ARGV, logger = Logger.new(STDERR), opts = {})
5556
# Save a copy of argv to print out later in debugging
56-
argv_save = argv.dup
57+
argv_save = OctocatalogDiff::Util::Util.deep_dup(argv)
5758

5859
# Are there additional ARGV to munge, e.g. that have been supplied in the options from a
5960
# configuration file?
@@ -131,7 +132,7 @@ def self.cli(argv = ARGV, logger = Logger.new(STDERR), opts = {})
131132
# @param argv [Array] Command line arguments (MUST be specified)
132133
# @return [Hash] Options
133134
def self.parse_opts(argv)
134-
options = { ignore: DEFAULT_IGNORES.dup }
135+
options = { ignore: OctocatalogDiff::Util::Util.deep_dup(DEFAULT_IGNORES) }
135136
Options.parse_options(argv, options)
136137
end
137138

0 commit comments

Comments
 (0)