diff --git a/lib/thor.rb b/lib/thor.rb index 8648505a..1d8e293c 100644 --- a/lib/thor.rb +++ b/lib/thor.rb @@ -474,9 +474,9 @@ def stop_on_unknown_option #:nodoc: @stop_on_unknown_option ||= [] end - # help command has the required check disabled by default. + # help and tree commands have the required check disabled by default. def disable_required_check #:nodoc: - @disable_required_check ||= [:help] + @disable_required_check ||= [:help, :tree] end def print_exclusive_options(shell, command = nil) # :nodoc: diff --git a/lib/thor/parser/options.rb b/lib/thor/parser/options.rb index 17d0cee5..8e4e84c9 100644 --- a/lib/thor/parser/options.rb +++ b/lib/thor/parser/options.rb @@ -134,7 +134,7 @@ def parse(args) # rubocop:disable Metrics/MethodLength check_requirement! unless @disable_required_check check_exclusive! - check_at_least_one! + check_at_least_one! unless @disable_required_check assigns = Thor::CoreExt::HashWithIndifferentAccess.new(@assigns) assigns.freeze