summaryrefslogtreecommitdiff
path: root/lib/rdoc/rdoc.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rdoc/rdoc.rb')
-rw-r--r--lib/rdoc/rdoc.rb19
1 files changed, 12 insertions, 7 deletions
diff --git a/lib/rdoc/rdoc.rb b/lib/rdoc/rdoc.rb
index adcb65b13b..68775c8be1 100644
--- a/lib/rdoc/rdoc.rb
+++ b/lib/rdoc/rdoc.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
require 'rdoc'
require 'find'
@@ -521,13 +521,18 @@ The internal error was:
# by the RDoc options
def generate
- Dir.chdir @options.op_dir do
- unless @options.quiet then
- $stderr.puts "\nGenerating #{@generator.class.name.sub(/^.*::/, '')} format into #{Dir.pwd}..."
- end
-
+ if @options.dry_run then
+ # do nothing
@generator.generate
- update_output_dir '.', @start_time, @last_modified
+ else
+ Dir.chdir @options.op_dir do
+ unless @options.quiet then
+ $stderr.puts "\nGenerating #{@generator.class.name.sub(/^.*::/, '')} format into #{Dir.pwd}..."
+ end
+
+ @generator.generate
+ update_output_dir '.', @start_time, @last_modified
+ end
end
end