Make triple-sure that the exit code is non-zero if we fail

This commit is contained in:
Paul Betts
2014-09-08 14:29:21 -07:00
parent e8f051d4fa
commit f5fefee369

View File

@@ -27,7 +27,14 @@ namespace Squirrel.Update
public static int Main(string[] args)
{
var pg = new Program();
return pg.main(args);
try {
return pg.main(args);
} catch (Exception ex) {
// NB: Normally this is a terrible idea but we want to make
// sure Setup.exe above us gets the nonzero error code
Console.Error.WriteLine(ex);
return -1;
}
}
int main(string[] args)