Compare commits

..

No commits in common. "0e34e638b0429153be5778bc1e39bf6100e1fae6" and "594d1bd4ab085e8cf057a7c3b8624b631d89f3cc" have entirely different histories.

View File

@ -11,7 +11,7 @@ namespace licenseGen;
internal class Program internal class Program
{ {
private static readonly CommandLineApplication App = new(); private static readonly CommandLineApplication App = new();
private static readonly CommandOption Cert = App.Option("--cert", "Certificate file", CommandOptionType.SingleValue); private static readonly CommandOption Cert = App.Option("--cert", "Certifcate file", CommandOptionType.SingleValue);
private static readonly CommandOption CoreDll = App.Option("--core", "Path to Core.dll", CommandOptionType.SingleValue); private static readonly CommandOption CoreDll = App.Option("--core", "Path to Core.dll", CommandOptionType.SingleValue);
private static Int32 Main(String[] args) private static Int32 Main(String[] args)
@ -269,30 +269,23 @@ internal class Program
private static void Check() private static void Check()
{ {
if (Cert == null || String.IsNullOrWhiteSpace(Cert.Value())) if (!File.Exists(Cert.Value()))
{
App.Error.WriteLine("No certificate specified");
App.ShowHelp();
Environment.Exit(1);
}
else if (CoreDll == null || String.IsNullOrWhiteSpace(CoreDll.Value()))
{
App.Error.WriteLine("No core dll specified");
App.ShowHelp();
Environment.Exit(1);
}
else if (!File.Exists(Cert.Value()))
{ {
App.Error.WriteLine($"Can't find certificate at: {Cert.Value()}"); App.Error.WriteLine($"Can't find certificate at: {Cert.Value()}");
App.ShowHelp(); App.ShowHelp();
Environment.Exit(1); Environment.Exit(1);
} }
else if (!File.Exists(CoreDll.Value())) if (!File.Exists(CoreDll.Value()))
{ {
App.Error.WriteLine($"Can't find core dll at: {CoreDll.Value()}"); App.Error.WriteLine($"Can't find core dll at: {CoreDll.Value()}");
App.ShowHelp(); App.ShowHelp();
Environment.Exit(1); Environment.Exit(1);
} }
if (Cert == null || String.IsNullOrWhiteSpace(Cert.Value()) || CoreDll == null || String.IsNullOrWhiteSpace(CoreDll.Value()))
{
App.ShowHelp();
Environment.Exit(1);
}
} }
// checkUsername Checks that the username is a valid username // checkUsername Checks that the username is a valid username