Display an error message if an unknown flag is encountered.
This commit is contained in:
parent
73b2efa75f
commit
2470b88a55
1 changed files with 7 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue