fixed not being able to specify user as argument when using 'add' action

This commit is contained in:
Carson McManus 2016-08-27 18:10:49 -04:00
parent 193dd40bc0
commit ecf440ef55

View file

@ -121,7 +121,7 @@ public static class Program
Console.WriteLine(Decrypt()); Console.WriteLine(Decrypt());
break; break;
case "setup": case "setup":
Setup(); Setup(user);
break; break;
default: default:
Console.WriteLine("error: Unknown action: {0}", action); Console.WriteLine("error: Unknown action: {0}", action);
@ -299,13 +299,16 @@ public static class Program
return true; return true;
} }
static void Setup() static void Setup(string username = "")
{ {
if (Verbose) Console.WriteLine("Opening manifest..."); if (Verbose) Console.WriteLine("Opening manifest...");
Manifest = Manifest.GetManifest(true); Manifest = Manifest.GetManifest(true);
if (string.IsNullOrWhiteSpace(username))
{
Console.Write("Username: "); Console.Write("Username: ");
var username = Console.ReadLine(); username = Console.ReadLine();
}
Console.Write("Password: "); Console.Write("Password: ");
var password = Console.ReadLine(); var password = Console.ReadLine();