Skip to content

Commit b3cbf05

Browse files
committed
msauth: address some linting issues with braces
1 parent c347cee commit b3cbf05

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

src/shared/Git-Credential-Manager/Program.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,19 @@ public static void Main(string[] args)
2020
{
2121
// Workaround for https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/2560
2222
if (MicrosoftAuthentication.CanUseBroker(context))
23-
try { MicrosoftAuthentication.InitializeBroker(); }
23+
{
24+
try
25+
{
26+
MicrosoftAuthentication.InitializeBroker();
27+
}
2428
catch (Exception ex)
2529
{
2630
context.Streams.Error.WriteLine(
2731
"warning: broker initialization failed{0}{1}",
2832
Environment.NewLine, ex.Message
2933
);
3034
}
35+
}
3136

3237
// Register all supported host providers at the normal priority.
3338
// The generic provider should never win against a more specific one, so register it with low priority.

src/shared/Microsoft.Git.CredentialManager/Authentication/MicrosoftAuthentication.cs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,24 @@ public class MicrosoftAuthentication : AuthenticationBase, IMicrosoftAuthenticat
4949

5050
public static void InitializeBroker()
5151
{
52-
if (IsBrokerInitialized) return;
52+
if (IsBrokerInitialized)
53+
{
54+
return;
55+
}
5356

5457
IsBrokerInitialized = true;
5558

5659
// Broker is only supported on Windows 10
57-
if (!PlatformUtils.IsWindows10()) return;
60+
if (!PlatformUtils.IsWindows10())
61+
{
62+
return;
63+
}
5864

5965
// Nothing to do when not an elevated user
60-
if (!PlatformUtils.IsElevatedUser()) return;
66+
if (!PlatformUtils.IsElevatedUser())
67+
{
68+
return;
69+
}
6170

6271
// Lower COM security so that MSAL can make the calls to WAM
6372
int result = Interop.Windows.Native.Ole32.CoInitializeSecurity(

0 commit comments

Comments
 (0)