class ModuleSync::CLI::Thor
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
-
show subcommands help using ‘msync subcommand –help`
Public Class Methods
Source
# File lib/modulesync/cli/thor.rb, line 33 def self.exit_on_failure? true end
Source
# File lib/modulesync/cli/thor.rb, line 15 def self.start(*args) if (Thor::HELP_MAPPINGS & ARGV).any? && subcommands.none? { |command| command.start_with?(ARGV[0]) } Thor::HELP_MAPPINGS.each do |cmd| if (match = ARGV.delete(cmd)) ARGV.unshift match end end end super end
Calls superclass method
Public Instance Methods
Source
# File lib/modulesync/cli/thor.rb, line 27 def _invalid_command_call self.class.new.help exit 1 end