From 5984f0d4427a08cdf735182603018c5b65cebdd1 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 4 Apr 2010 16:58:24 -0700 Subject: [PATCH] Turns out mono eats exit codes. AWESOME. --- installer/builder/Main.cs | 3 +-- support/buildbot/startbuild.pl | 14 ++++++-------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/installer/builder/Main.cs b/installer/builder/Main.cs index f9b82793..7f3fc696 100755 --- a/installer/builder/Main.cs +++ b/installer/builder/Main.cs @@ -60,8 +60,7 @@ public void Release(string file) if (!builder.Build(m_Cfg, build)) { - Console.WriteLine("Build failed!"); - System.Environment.Exit(1); + throw new Exception("Build failed!"); } else { diff --git a/support/buildbot/startbuild.pl b/support/buildbot/startbuild.pl index a72ce804..e00faec9 100755 --- a/support/buildbot/startbuild.pl +++ b/support/buildbot/startbuild.pl @@ -9,18 +9,16 @@ require 'helpers.pm'; chdir('../../installer/builder'); +my $output; if ($^O eq "linux") { - system("mono builder.exe"); + $output = `mono builder.exe`; } else { - system("builder.exe"); + $output = `builder.exe`; } -if ($? != 0) -{ - die "Build failed: $!\n"; -} -else -{ +if ($output =~ /Build failed/) { + die "Build failed!\n"; +} else { exit(0); }