Display an error message if an unknown flag is encountered.

This commit is contained in:
Starbeamrainbowlabs 2016-05-19 20:59:57 +01:00
parent 73b2efa75f
commit 2470b88a55

View file

@ -23,7 +23,7 @@ namespace SpritePacker
private static string commitHashFilename = "SpritePacker.latest-commit-hash.txt";
private static List<string> values = new List<string>();
public static void Main(string[] args)
public static int Main(string[] args)
{
string commitHash = Utilities.GetEmbeddedResourceContent(commitHashFilename).Trim();
Version += "-" + commitHash.Substring(commitHash.Length - 7);
@ -39,6 +39,11 @@ namespace SpritePacker
programMode = ProgramMode.DisplayVersionText;
break;
default:
if(args[i].StartsWith("-"))
{
Console.Error.WriteLine("Error: Unrecognised flag '{0}'.", args[i]);
return 1;
}
values.Add(args[i]);
break;
}
@ -66,6 +71,7 @@ namespace SpritePacker
break;
}
return 0;
}
public static void RunNormal()