Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/thor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion lib/thor/parser/options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down