From 31751b1c6929e840a0df5d7d3ca672350895733b Mon Sep 17 00:00:00 2001 From: b0urb4k1 Date: Sun, 26 Mar 2017 20:51:08 +0200 Subject: [PATCH 1/2] ExitCode can be chosen now --- src/app/FakeLib/TargetHelper.fs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/FakeLib/TargetHelper.fs b/src/app/FakeLib/TargetHelper.fs index a83ff662a8d..83d40181612 100644 --- a/src/app/FakeLib/TargetHelper.fs +++ b/src/app/FakeLib/TargetHelper.fs @@ -450,7 +450,8 @@ let WriteTaskTimeSummary total = module ExitCode = let exitCode = ref 0 -let private changeExitCodeIfErrorOccured() = if errors <> [] then Environment.ExitCode <- 42; ExitCode.exitCode := 42 + let mutable exitCodeValue = 42 +let private changeExitCodeIfErrorOccured() = if errors <> [] then Environment.ExitCode <- ExitCode.exitCodeValue; ExitCode.exitCode := ExitCode.exitCodeValue /// [omit] let isListMode = hasBuildParam "list" From cd7a2aa306ffb7d0da1970a8923cf8f13a11255d Mon Sep 17 00:00:00 2001 From: b0urb4k1 Date: Sun, 26 Mar 2017 21:04:02 +0200 Subject: [PATCH 2/2] ExitCode variable renamed --- src/app/FakeLib/TargetHelper.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/FakeLib/TargetHelper.fs b/src/app/FakeLib/TargetHelper.fs index 83d40181612..22198ce5828 100644 --- a/src/app/FakeLib/TargetHelper.fs +++ b/src/app/FakeLib/TargetHelper.fs @@ -450,8 +450,8 @@ let WriteTaskTimeSummary total = module ExitCode = let exitCode = ref 0 - let mutable exitCodeValue = 42 -let private changeExitCodeIfErrorOccured() = if errors <> [] then Environment.ExitCode <- ExitCode.exitCodeValue; ExitCode.exitCode := ExitCode.exitCodeValue + let mutable Value = 42 +let private changeExitCodeIfErrorOccured() = if errors <> [] then Environment.ExitCode <- ExitCode.Value; ExitCode.exitCode := ExitCode.Value /// [omit] let isListMode = hasBuildParam "list"