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)
26
26
end ,
27
27
post_process : lambda do |opts |
28
28
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
30
32
end
31
33
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
33
37
end
34
38
if opts [ :to_hiera_path ] == :none || opts [ :from_hiera_path ] == :none
35
39
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)
15
15
desc : 'Path prefix to strip when munging hiera.yaml' ,
16
16
post_process : lambda do |opts |
17
17
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
19
21
end
20
22
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
22
26
end
23
27
if opts [ :to_hiera_path_strip ] == :none || opts [ :from_hiera_path_strip ] == :none
24
28
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