From e24a005642863869c29c7ed2b6d73946ce7eaeb3 Mon Sep 17 00:00:00 2001 From: Vitor M <4777793+vgmello@users.noreply.github.com> Date: Mon, 6 Nov 2023 13:04:51 +0000 Subject: [PATCH] Fixing wrap --- .../Commands/RDS/GetRdsPassword.cs | 3 ++- src/Ellosoft.AwsCredentialsManager/GlobalSuppressions.cs | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 src/Ellosoft.AwsCredentialsManager/GlobalSuppressions.cs diff --git a/src/Ellosoft.AwsCredentialsManager/Commands/RDS/GetRdsPassword.cs b/src/Ellosoft.AwsCredentialsManager/Commands/RDS/GetRdsPassword.cs index 85fe0a1..2a61d44 100644 --- a/src/Ellosoft.AwsCredentialsManager/Commands/RDS/GetRdsPassword.cs +++ b/src/Ellosoft.AwsCredentialsManager/Commands/RDS/GetRdsPassword.cs @@ -122,7 +122,8 @@ private async Task GenerateDbPassword(string? credential, string? hostname, int? var regionEndpoint = RegionEndpoint.GetBySystemName(region); var dbPassword = _rdsTokenGenerator.GenerateDbPassword(awsCredentials, regionEndpoint, hostname, port.Value, username, ttl); - AnsiConsole.MarkupLine($"\r\n[green]DB Password:[/]\r\n{dbPassword}\r\n"); + AnsiConsole.MarkupLine("\r\n[green]DB Password:[/]"); + Console.WriteLine(dbPassword); } catch (ArgumentNullException e) { diff --git a/src/Ellosoft.AwsCredentialsManager/GlobalSuppressions.cs b/src/Ellosoft.AwsCredentialsManager/GlobalSuppressions.cs new file mode 100644 index 0000000..4f8026f --- /dev/null +++ b/src/Ellosoft.AwsCredentialsManager/GlobalSuppressions.cs @@ -0,0 +1,6 @@ +using System.Diagnostics.CodeAnalysis; + +[assembly: SuppressMessage("Usage", "Spectre1000:Use AnsiConsole instead of System.Console", + Justification = "Required for non-wrapped text output", Scope = "member", + Target = "~M:Ellosoft.AwsCredentialsManager.Commands.RDS.GetRdsPassword.GenerateDbPassword" + + "(System.String,System.String,System.Nullable{System.Int32},System.String,System.String,System.Int32)~System.Threading.Tasks.Task")]