Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
z4kn4fein committed Oct 16, 2021
1 parent 4787fb6 commit 67f1ab4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 21 deletions.
1 change: 0 additions & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,4 @@ rm -rf "$UCPATH"

configcat cat

echo
echo "==> ConfigCat CLI v${VERSION} successfully installed. Happy Feature Flagging!"
20 changes: 10 additions & 10 deletions src/ConfigCat.Cli/Commands/Scan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ public async Task<int> InvokeAsync(ScanArguments scanArguments, CancellationToke
var aliveFlagReferences = Filter(flagReferences, r => r.FoundFlag is not DeletedFlagModel);
var deletedFlagReferences = Filter(flagReferences, r => r.FoundFlag is DeletedFlagModel);

this.output.Write("Found ");
this.output.WriteColored(aliveFlagReferences.Sum(f => f.References.Count()).ToString(), ForegroundColorSpan.LightCyan());
this.output.Write($" feature flag / setting reference(s) in ");
this.output.WriteColored(aliveFlagReferences.Count().ToString(), ForegroundColorSpan.LightCyan());
this.output.Write(" file(s). " +
$"Keys: [{string.Join(", ", aliveFlagReferences.SelectMany(r => r.References).Select(r => r.FoundFlag.Key).Distinct())}]");
this.output.WriteLine();
this.output.Write("Found ")
.WriteColored(aliveFlagReferences.Sum(f => f.References.Count()).ToString(), ForegroundColorSpan.LightCyan())
.Write($" feature flag / setting reference(s) in ")
.WriteColored(aliveFlagReferences.Count().ToString(), ForegroundColorSpan.LightCyan())
.Write(" file(s). " +
$"Keys: [{string.Join(", ", aliveFlagReferences.SelectMany(r => r.References).Select(r => r.FoundFlag.Key).Distinct())}]")
.WriteLine();

if (scanArguments.Print)
this.PrintReferences(aliveFlagReferences);
Expand Down Expand Up @@ -104,9 +104,9 @@ public async Task<int> InvokeAsync(ScanArguments scanArguments, CancellationToke

var branch = gitInfo == null || gitInfo.Branch.IsEmpty() ? scanArguments.Branch : gitInfo.Branch;
var commitHash = gitInfo?.CurrentCommitHash ?? scanArguments.CommitHash;
this.output.WriteUnderline("Repository").Write(":").WriteColored($" {scanArguments.Repo}", ForegroundColorSpan.LightCyan()).WriteLine();
this.output.WriteUnderline("Branch").Write(":").WriteColored($" {branch}", ForegroundColorSpan.LightCyan()).WriteLine();
this.output.WriteUnderline("Commit").Write(":").WriteColored($" {commitHash}", ForegroundColorSpan.LightCyan()).WriteLine();
this.output.WriteUnderline("Repository").Write(":").WriteColored($" {scanArguments.Repo}", ForegroundColorSpan.LightCyan()).WriteLine()
.WriteUnderline("Branch").Write(":").WriteColored($" {branch}", ForegroundColorSpan.LightCyan()).WriteLine()
.WriteUnderline("Commit").Write(":").WriteColored($" {commitHash}", ForegroundColorSpan.LightCyan()).WriteLine();
var repositoryDirectory = gitInfo == null || gitInfo.WorkingDirectory.IsEmpty() ? scanArguments.Directory.FullName : gitInfo.WorkingDirectory;
await this.codeReferenceClient.UploadAsync(new CodeReferenceRequest
{
Expand Down
16 changes: 6 additions & 10 deletions src/ConfigCat.Cli/Commands/Setup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,15 @@ public async Task<int> InvokeAsync(SetupArgs arguments, CancellationToken token)
};
await this.configurationStorage.WriteConfigAsync(this.cliConfig, token);

this.output.WriteSuccess();
this.output.WriteLine();
this.output.Write($"Verifying your credentials against '{arguments.ApiHost}'... ");
this.output.WriteSuccess().WriteLine().Write($"Verifying your credentials against '{arguments.ApiHost}'... ");

var me = await this.meClient.GetMeAsync(token);

this.output.WriteSuccess();
this.output.Write($" Welcome, {me.FullName}.");
this.output.WriteLine();
this.output.WriteLine();
this.output.WriteGreen("Setup complete.");
this.output.WriteLine();
this.output.WriteLine();
this.output.WriteSuccess()
.Write($" Welcome, {me.FullName}.")
.WriteLine().WriteLine()
.WriteGreen("Setup complete.")
.WriteLine().WriteLine();

return ExitCodes.Ok;
}
Expand Down

0 comments on commit 67f1ab4

Please sign in to comment.