From 439d8a299be32d027c729b8187e8ff7f7511e116 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Sun, 12 Feb 2023 19:12:27 -0800 Subject: [PATCH] fix an issue where we created a temporary directory when performing a dry run --- CHANGELOG.md | 6 ++++-- lib/options.dart | 1 + lib/src/dartdoc.dart | 3 --- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5253bd7926..f2a63197bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,12 @@ ## 6.2.0-dev -* Stop generating a null-safety badge for elements - in a null-safe library. (#3295) +* Stop generating a null-safety badge for elements in a null-safe library. + (#3295) * Use a sun icon for switching to the light theme. (#3309) * Standardize the search icon style to a new SVG. (#3302) * Remove CSS classes no longer used in dartdoc generated content. (#3302) +* Fix an issue where we created a temporary directory when performing a dry run. + (#3333) ## 6.1.5 diff --git a/lib/options.dart b/lib/options.dart index 22d7a73663..d00295ea35 100644 --- a/lib/options.dart +++ b/lib/options.dart @@ -59,6 +59,7 @@ class DartdocProgramOptionContext extends DartdocGeneratorOptionContext super.optionSet, super.resourceProvider) : super.fromDefaultContextLocation(); + /// Whether to generate docs or perform a dry run. bool get generateDocs => optionSet['generateDocs'].valueAt(context); bool get help => optionSet['help'].valueAt(context); bool get version => optionSet['version'].valueAt(context); diff --git a/lib/src/dartdoc.dart b/lib/src/dartdoc.dart index ada08a30f2..425fd69bce 100644 --- a/lib/src/dartdoc.dart +++ b/lib/src/dartdoc.dart @@ -204,9 +204,6 @@ class Dartdoc { var libs = packageGraph.libraryCount; logInfo("Initialized dartdoc with $libs librar${libs == 1 ? 'y' : 'ies'}"); - // Create the out directory. - if (!_outputDir.exists) _outputDir.create(); - runtimeStats.startPerfTask('generator.generate'); await generator.generate(packageGraph); runtimeStats.endPerfTask();