Sha256: 3f3a3903b94de317ae59ae1bcca2e8bc4abc68add13a19b9695c9f1e1ceffa5b

Contents?: true

Size: 607 Bytes

Versions: 15

Compression:

Stored size: 607 Bytes

Contents

# frozen_string_literal: true

module Karafka
  class Cli < Thor
    # Command that gets invoked when no method is provided when running the CLI
    # It allows us to exit with exit code 1 instead of default 0 to indicate that something
    #   was missing
    # @see https://github.com/karafka/karafka/issues/619
    class Missingno < Base
      desc 'Hidden command that gets invoked when no command is provided', hide: true

      # Prints an error about the lack of command (nothing selected)
      def call
        Karafka.logger.error('No command provided')
        exit 1
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
karafka-1.4.15 lib/karafka/cli/missingno.rb
karafka-1.4.14 lib/karafka/cli/missingno.rb
karafka-1.4.13 lib/karafka/cli/missingno.rb
karafka-1.4.12 lib/karafka/cli/missingno.rb
karafka-1.4.11 lib/karafka/cli/missingno.rb
karafka-1.4.10 lib/karafka/cli/missingno.rb
karafka-1.4.9 lib/karafka/cli/missingno.rb
karafka-1.4.8 lib/karafka/cli/missingno.rb
karafka-1.4.7 lib/karafka/cli/missingno.rb
karafka-1.4.6 lib/karafka/cli/missingno.rb
karafka-1.4.5 lib/karafka/cli/missingno.rb
karafka-1.4.4 lib/karafka/cli/missingno.rb
karafka-1.4.3 lib/karafka/cli/missingno.rb
karafka-1.4.2 lib/karafka/cli/missingno.rb
karafka-1.4.1 lib/karafka/cli/missingno.rb