Skip to content

Commit ac5b499

Browse files
committed
fix double log message
(cherry picked from commit 6f375b0)
1 parent 2195124 commit ac5b499

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Elastic.Markdown/DocumentationGenerator.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,11 @@ private bool CompilationNotNeeded(GenerationState? generationState, out HashSet<
128128
outputSeenChanges = generationState?.LastSeenChanges ?? DateTimeOffset.MinValue;
129129
if (generationState == null)
130130
return false;
131+
if (Context.Force)
132+
{
133+
_logger.LogInformation($"Full compilation: --force was specified");
134+
return false;
135+
}
131136

132137
if (Context.Git != generationState.Git)
133138
{
@@ -144,7 +149,6 @@ private bool CompilationNotNeeded(GenerationState? generationState, out HashSet<
144149
_logger.LogInformation($"Incremental compilation. since: {generationState.LastSeenChanges}");
145150
else if (DocumentationSet.LastWrite <= outputSeenChanges)
146151
{
147-
_logger.LogInformation($"No compilation: no changes since last observed: {generationState.LastSeenChanges}");
148152
_logger.LogInformation($"No compilation: no changes since last observed: {generationState.LastSeenChanges} "
149153
+ "Pass --force to force a full regeneration");
150154
return true;
@@ -157,6 +161,7 @@ private async Task GenerateLinkReference(Cancel ctx)
157161
{
158162
var file = DocumentationSet.LinkReferenceFile;
159163
var state = LinkReference.Create(DocumentationSet);
164+
160165
var bytes = JsonSerializer.SerializeToUtf8Bytes(state, SourceGenerationContext.Default.LinkReference);
161166
await DocumentationSet.OutputPath.FileSystem.File.WriteAllBytesAsync(file.FullName, bytes, ctx);
162167
}

0 commit comments

Comments
 (0)