refactor: add brackets to some abbreviated if statements
This commit is contained in:
parent
5018803889
commit
0a21502a8f
1 changed files with 14 additions and 3 deletions
17
Program.cs
17
Program.cs
|
@ -42,7 +42,9 @@ namespace SteamGuard
|
||||||
{
|
{
|
||||||
i++;
|
i++;
|
||||||
if (i < args.Length)
|
if (i < args.Length)
|
||||||
|
{
|
||||||
SteamGuardPath = args[i];
|
SteamGuardPath = args[i];
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Console.WriteLine($"Expected path after {args[i-1]}");
|
Console.WriteLine($"Expected path after {args[i-1]}");
|
||||||
|
@ -84,15 +86,21 @@ namespace SteamGuard
|
||||||
action = "generate-code";
|
action = "generate-code";
|
||||||
}
|
}
|
||||||
else if (string.IsNullOrEmpty(user))
|
else if (string.IsNullOrEmpty(user))
|
||||||
|
{
|
||||||
user = args[i];
|
user = args[i];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (string.IsNullOrEmpty(user))
|
else if (string.IsNullOrEmpty(user))
|
||||||
|
{
|
||||||
user = args[i];
|
user = args[i];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(action))
|
if (string.IsNullOrEmpty(action))
|
||||||
|
{
|
||||||
action = "generate-code";
|
action = "generate-code";
|
||||||
|
}
|
||||||
|
|
||||||
// Do some configuring
|
// Do some configuring
|
||||||
SteamGuardPath = SteamGuardPath.Replace("~", Environment.GetEnvironmentVariable("HOME"));
|
SteamGuardPath = SteamGuardPath.Replace("~", Environment.GetEnvironmentVariable("HOME"));
|
||||||
|
@ -110,9 +118,12 @@ namespace SteamGuard
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Verbose) Console.WriteLine($"Action: {action}");
|
if (Verbose)
|
||||||
if (Verbose) Console.WriteLine($"User: {user}");
|
{
|
||||||
if (Verbose) Console.WriteLine($"maFiles path: {SteamGuardPath}");
|
Console.WriteLine($"Action: {action}");
|
||||||
|
Console.WriteLine($"User: {user}");
|
||||||
|
Console.WriteLine($"maFiles path: {SteamGuardPath}");
|
||||||
|
}
|
||||||
|
|
||||||
// Perform desired action
|
// Perform desired action
|
||||||
switch (action)
|
switch (action)
|
||||||
|
|
Loading…
Reference in a new issue