Skip to content

Commit 64ef5ab

Browse files
committed
Improve console output look
1 parent 3c32669 commit 64ef5ab

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/EasySign.CommandLine/BundleWorker.cs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,10 @@ protected virtual void RunAdd(StatusContext statusContext, string[] files, bool
193193
}
194194
});
195195

196+
AnsiConsole.WriteLine();
197+
196198
if (errorOccurred)
197199
{
198-
AnsiConsole.WriteLine();
199200
AnsiConsole.MarkupLine("[orange]One or more errors occurred, check the console output or logs for more information[/]");
200201
}
201202

@@ -397,6 +398,13 @@ protected virtual bool RunVerify(StatusContext statusContext, bool ignoreTime)
397398
statusContext.Status("[yellow]Loading Bundle[/]");
398399
if (!LoadBundle()) return false;
399400

401+
if (Bundle.Signatures.Entries.Count == 0)
402+
{
403+
Logger.LogError("Bundle is not signed");
404+
AnsiConsole.MarkupLine($"[red]The file is not signed[/]");
405+
return false;
406+
}
407+
400408
Logger.LogInformation("Starting certificate and signature verification");
401409
statusContext.Status("[yellow]Verification Phase 1: Certificates and signatures[/]");
402410

@@ -436,12 +444,6 @@ protected virtual bool RunVerify(StatusContext statusContext, bool ignoreTime)
436444

437445
if (verifiedCerts == 0)
438446
{
439-
if (Bundle.Signatures.Entries.Count == 0)
440-
{
441-
Logger.LogWarning("Bundle is not signed");
442-
AnsiConsole.MarkupLine($"[red]The file is not signed[/]");
443-
}
444-
445447
Logger.LogWarning("No certificates were verified");
446448
AnsiConsole.MarkupLine($"[red]Verification failed[/]");
447449
return false;

0 commit comments

Comments
 (0)