summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSimon Hafner <hafnersimon@gmail.com>2015-01-28 13:19:34 -0600
committerSimon Hafner <hafnersimon@gmail.com>2015-01-28 13:19:34 -0600
commit1a88e2a18bc54cbea743ccb526cbd691312577a4 (patch)
tree8376b2f6f33966d79a519c432f8bbb2607e3c431
parent85ae439bb8f3aa207a2cc3bc868a94d4e9025ad5 (diff)
downloadNim-1a88e2a18bc54cbea743ccb526cbd691312577a4.tar.gz
koch temp has 125 exit code for git bisect
-rw-r--r--koch.nim8
1 files changed, 5 insertions, 3 deletions
diff --git a/koch.nim b/koch.nim
index 432b9ff3d..bc7631bcc 100644
--- a/koch.nim
+++ b/koch.nim
@@ -77,9 +77,9 @@ proc findNim(): string =
   # assume there is a symlink to the exe or something:
   return nim
 
-proc exec(cmd: string) =
+proc exec(cmd: string, errorcode: int = QuitFailure) =
   echo(cmd)
-  if execShellCmd(cmd) != 0: quit("FAILURE")
+  if execShellCmd(cmd) != 0: quit("FAILURE", errorcode)
 
 proc tryExec(cmd: string): bool = 
   echo(cmd)
@@ -341,7 +341,9 @@ proc tests(args: string) =
 proc temp(args: string) =
   var output = "compiler" / "nim".exe
   var finalDest = "bin" / "nim_temp".exe
-  exec("nim c compiler" / "nim")
+  # 125 is the magic number to tell git bisect to skip the current
+  # commit.
+  exec("nim c compiler" / "nim", 125)
   copyExe(output, finalDest)
   if args.len > 0: exec(finalDest & " " & args)