File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
lib/octocatalog-diff/cli/options Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -26,10 +26,14 @@ def parse(parser, options)
2626 end ,
2727 post_process : lambda do |opts |
2828 if opts . key? ( :to_hiera_path_strip ) && opts [ :to_hiera_path_strip ] != :none
29- raise ArgumentError , '--hiera-path and --hiera-path-strip are mutually exclusive'
29+ if opts . key? ( :to_hiera_path ) && opts [ :to_hiera_path ] != :none
30+ raise ArgumentError , '--hiera-path and --hiera-path-strip are mutually exclusive'
31+ end
3032 end
3133 if opts . key? ( :from_hiera_path_strip ) && opts [ :from_hiera_path_strip ] != :none
32- raise ArgumentError , '--hiera-path and --hiera-path-strip are mutually exclusive'
34+ if opts . key? ( :from_hiera_path ) && opts [ :from_hiera_path ] != :none
35+ raise ArgumentError , '--hiera-path and --hiera-path-strip are mutually exclusive'
36+ end
3337 end
3438 if opts [ :to_hiera_path ] == :none || opts [ :from_hiera_path ] == :none
3539 raise ArgumentError , '--hiera-path and --no-hiera-path are mutually exclusive'
Original file line number Diff line number Diff line change @@ -15,10 +15,14 @@ def parse(parser, options)
1515 desc : 'Path prefix to strip when munging hiera.yaml' ,
1616 post_process : lambda do |opts |
1717 if opts . key? ( :to_hiera_path ) && opts [ :to_hiera_path ] != :none
18- raise ArgumentError , '--hiera-path and --hiera-path-strip are mutually exclusive'
18+ if opts . key? ( :to_hiera_path_strip ) && opts [ :to_hiera_path_strip ] != :none
19+ raise ArgumentError , '--hiera-path and --hiera-path-strip are mutually exclusive'
20+ end
1921 end
2022 if opts . key? ( :from_hiera_path ) && opts [ :from_hiera_path ] != :none
21- raise ArgumentError , '--hiera-path and --hiera-path-strip are mutually exclusive'
23+ if opts . key? ( :from_hiera_path_strip ) && opts [ :from_hiera_path_strip ] != :none
24+ raise ArgumentError , '--hiera-path and --hiera-path-strip are mutually exclusive'
25+ end
2226 end
2327 if opts [ :to_hiera_path_strip ] == :none || opts [ :from_hiera_path_strip ] == :none
2428 raise ArgumentError , '--hiera-path-strip and --no-hiera-path-strip are mutually exclusive'
You can’t perform that action at this time.
0 commit comments