From ecf440ef55b4def1b985ba7ff707e19fc130b166 Mon Sep 17 00:00:00 2001 From: Carson McManus Date: Sat, 27 Aug 2016 18:10:49 -0400 Subject: [PATCH] fixed not being able to specify user as argument when using 'add' action --- Program.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Program.cs b/Program.cs index a3436e2..57f14b6 100644 --- a/Program.cs +++ b/Program.cs @@ -121,7 +121,7 @@ public static class Program Console.WriteLine(Decrypt()); break; case "setup": - Setup(); + Setup(user); break; default: Console.WriteLine("error: Unknown action: {0}", action); @@ -299,13 +299,16 @@ public static class Program return true; } - static void Setup() + static void Setup(string username = "") { if (Verbose) Console.WriteLine("Opening manifest..."); Manifest = Manifest.GetManifest(true); - Console.Write("Username: "); - var username = Console.ReadLine(); + if (string.IsNullOrWhiteSpace(username)) + { + Console.Write("Username: "); + username = Console.ReadLine(); + } Console.Write("Password: "); var password = Console.ReadLine();