Commit a096afdc authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Perform the export options check only in Validator.

Previously the logic for this check was duplicated and sadly wrong.
parent 22e5712c
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -72,13 +72,7 @@ module JsDuck
            "",
            "- full     - docs and metadata for class and its members.",
            "- examples - inline examples from classes and guides.") do |format|
            export_type = format.to_sym
            if [:full, :examples].include?(export_type)
              @opts.export = export_type
            else
              Logger.fatal("Unsupported export type: '#{export_type}'")
              exit(1)
            end
            @opts.export = format.to_sym
          end

          optparser.on('--builtin-classes',
+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ module JsDuck
      end

      def valid_export_format
        if ![nil, :full, :api, :examples].include?(@opts.export)
        if ![nil, :full, :examples].include?(@opts.export)
          fatal("Unknown export format: #{@export}")
        end
      end