Explorar el Código

Display an error message if an unknown flag is encountered.

tags/v0.1
Starbeamrainbowlabs hace 3 años
padre
commit
2470b88a55
Se han modificado 1 ficheros con 7 adiciones y 1 borrados
  1. 7
    1
      SpritePacker/Program.cs

+ 7
- 1
SpritePacker/Program.cs Ver fichero

@@ -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()

Cargando…
Cancelar
Guardar