lib/pdk/cli.rb in pdk-0.3.0 vs lib/pdk/cli.rb in pdk-0.4.0
- old
+ new
@@ -58,22 +58,18 @@
"for example: '--format=junit:report.xml'. This option may be specified " \
'multiple times as long as each option specifies a distinct target file.',
) % { available_formats: PDK::Report.formats.join("', '") }
option :f, :format, format_desc, argument: :required, multiple: true do |values|
- values.compact.each do |v|
- if v.include?(':')
- format = v.split(':', 2).first
-
- Util::OptionValidator.enum(format, PDK::Report.formats)
- else
- Util::OptionValidator.enum(v, PDK::Report.formats)
- end
- end
+ PDK::CLI::Util::OptionNormalizer.report_formats(values.compact)
end
flag :d, :debug, _('Enable debug output.') do |_, _|
PDK.logger.enable_debug_output
+ end
+
+ option nil, 'answer-file', _('Path to an answer file'), argument: :required, hidden: true do |value|
+ PDK.answer_file = value
end
end
require 'pdk/cli/new'
require 'pdk/cli/test'