refactor: add brackets to some abbreviated if statements

This commit is contained in:
Carson McManus 2017-05-22 17:56:54 -04:00
parent 5018803889
commit 0a21502a8f

View file

@ -42,7 +42,9 @@ namespace SteamGuard
{
i++;
if (i < args.Length)
{
SteamGuardPath = args[i];
}
else
{
Console.WriteLine($"Expected path after {args[i-1]}");
@ -84,15 +86,21 @@ namespace SteamGuard
action = "generate-code";
}
else if (string.IsNullOrEmpty(user))
{
user = args[i];
}
}
else if (string.IsNullOrEmpty(user))
{
user = args[i];
}
}
}
if (string.IsNullOrEmpty(action))
{
action = "generate-code";
}
// Do some configuring
SteamGuardPath = SteamGuardPath.Replace("~", Environment.GetEnvironmentVariable("HOME"));
@ -110,9 +118,12 @@ namespace SteamGuard
}
}
if (Verbose) Console.WriteLine($"Action: {action}");
if (Verbose) Console.WriteLine($"User: {user}");
if (Verbose) Console.WriteLine($"maFiles path: {SteamGuardPath}");
if (Verbose)
{
Console.WriteLine($"Action: {action}");
Console.WriteLine($"User: {user}");
Console.WriteLine($"maFiles path: {SteamGuardPath}");
}
// Perform desired action
switch (action)