Class: ModuleSync::CLI::Thor

Inherits:
Thor
  • Object
show all
Defined in:
lib/modulesync/cli/thor.rb

Overview

Workaround some, still unfixed, Thor behaviors

This class extends ::Thor class to

  • exit with status code sets to ‘1` on Thor failure (e.g. missing required option)

  • exit with status code sets to ‘1` when user calls `msync` (or a subcommand) without required arguments

Direct Known Subclasses

Base, Hook

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/modulesync/cli/thor.rb', line 19

def self.exit_on_failure?
  true
end

Instance Method Details

#_invalid_command_callObject



13
14
15
16
# File 'lib/modulesync/cli/thor.rb', line 13

def _invalid_command_call
  self.class.new.help
  exit 1
end