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.WriteLine("Please specify an option.");
Console.ResetColor();
} else {
switch (args[0]) {
case "determinePacmanCacheDirectory":
Console.WriteLine(PacserverUtils.determinePacmanCacheDirectory());
break;
default:
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("Possible options are: determinePacmanCacheDirectory");
Console.ResetColor();
break;
}
Console.WriteLine("Possible options are: determinePacmanCacheDirectory");
return;
}
switch (args[0]) {
case "determinePacmanCacheDirectory":
Console.WriteLine(PacserverUtils.determinePacmanCacheDirectory());
break;
default:
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine(args[0] + " is not a recognized option.");
Console.ResetColor();
Console.WriteLine("Possible options are: determinePacmanCacheDirectory");
break;
}
}
}