lib/bundler/vendor/thor/lib/thor.rb in bundler-2.1.0.pre.3 vs lib/bundler/vendor/thor/lib/thor.rb in bundler-2.1.0
- old
+ new
@@ -342,9 +342,16 @@
def disable_required_check?(command) #:nodoc:
command && disable_required_check.include?(command.name.to_sym)
end
+ def deprecation_warning(message) #:nodoc:
+ unless ENV['THOR_SILENCE_DEPRECATION']
+ warn "Deprecation warning: #{message}\n" +
+ 'You can silence deprecations warning by setting the environment variable THOR_SILENCE_DEPRECATION.'
+ end
+ end
+
protected
def stop_on_unknown_option #:nodoc:
@stop_on_unknown_option ||= Set.new
end