Skip to content

Commit 983ab26

Browse files
author
Kevin Paulisse
committed
Set default for hiera_path
1 parent 466f653 commit 983ab26

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • lib/octocatalog-diff/catalog-diff

lib/octocatalog-diff/catalog-diff/cli.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ class Cli
3939
compare_file_text: true,
4040
display_datatype_changes: true,
4141
parallel: true,
42-
suppress_absent_file_details: true
42+
suppress_absent_file_details: true,
43+
hiera_path: 'hieradata'
4344
}.freeze
4445

4546
# This method is the one to call externally. It is possible to specify alternate
@@ -75,6 +76,8 @@ def self.cli(argv = ARGV, logger = Logger.new(STDERR), opts = {})
7576
# Note: do NOT use 'options[k] ||= v' here because if the value of options[k] is boolean(false)
7677
# it will then be overridden. Whereas the intent is to define values only for those keys that don't exist.
7778
DEFAULT_OPTIONS.each { |k, v| options[k] = v unless options.key?(k) }
79+
veto_with_none_options = %w(hiera_path hiera_path_strip)
80+
veto_with_none_options.each { |x| options.delete(x.to_sym) if options[x.to_sym] == :none }
7881

7982
# Fact overrides come in here - 'options' is modified
8083
setup_fact_overrides(options)

0 commit comments

Comments
 (0)