Change how commandline arguments are handled

This commit is contained in:
ProfessionalUwU 2023-06-04 22:55:31 +02:00
parent 35c6c5c8d9
commit 89e79b1025
Signed by: ProfessionalUwU
GPG Key ID: 013AD77C0A9DD3F2

View File

@ -6,17 +6,20 @@ public class Program {
Console.ForegroundColor = ConsoleColor.Red; Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("Please specify an option."); Console.WriteLine("Please specify an option.");
Console.ResetColor(); Console.ResetColor();
} else { Console.WriteLine("Possible options are: determinePacmanCacheDirectory");
switch (args[0]) { return;
case "determinePacmanCacheDirectory": }
Console.WriteLine(PacserverUtils.determinePacmanCacheDirectory());
break; switch (args[0]) {
default: case "determinePacmanCacheDirectory":
Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine(PacserverUtils.determinePacmanCacheDirectory());
Console.WriteLine("Possible options are: determinePacmanCacheDirectory"); break;
Console.ResetColor(); default:
break; Console.ForegroundColor = ConsoleColor.Red;
} Console.WriteLine(args[0] + " is not a recognized option.");
Console.ResetColor();
Console.WriteLine("Possible options are: determinePacmanCacheDirectory");
break;
} }
} }
} }