Skip to content
This repository was archived by the owner on Nov 9, 2022. It is now read-only.

Commit 0a3d1db

Browse files
committed
bug fixed
1 parent 0a3ef8e commit 0a3d1db

File tree

2 files changed

+25
-6
lines changed

2 files changed

+25
-6
lines changed

Bake.Actions/Run.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ let runTask echo waitForExit script (command: string seq) = {
2626
command
2727
|> Seq.iter (fun cmd ->
2828
if echo then lock stdout (fun () -> printfn "%s" cmd)
29-
run waitForExit cmd script.scriptFile.Directory.FullName)
29+
run waitForExit script.scriptFile.Directory.FullName cmd)
3030
}
3131

3232
let runAction echo waitForExit = fun ctx script ->

Bake/Program.fs

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ open Bake
55
let processError fmt =
66
Console.ForegroundColor <- ConsoleColor.Red
77
Console.Beep ()
8-
Printf.kprintf (fun _ -> Console.ResetColor (); -1) fmt
8+
printfn fmt
99

1010
[<EntryPoint>]
1111
let main args =
@@ -67,12 +67,31 @@ let main args =
6767

6868
0
6969
with
70-
| Parser.ParsingError e -> processError "Parsing Error:%s" e
71-
| Action.ActionNotFound e -> processError "Action Not Found:%s" e
72-
| Action.ActionUsageError e -> processError "Action Usage Error:%s" e
70+
| Parser.ParsingError e ->
71+
processError "Parsing Error:%s" e
72+
Console.ResetColor ()
73+
-1
74+
| Action.ActionNotFound e ->
75+
processError "Action Not Found:%s" e
76+
Console.ResetColor ()
77+
-2
78+
| Action.ActionUsageError e ->
79+
processError "Action Usage Error:%s" e
80+
Console.ResetColor ()
81+
-3
7382
| Action.ActionException (script, ctx, e) ->
7483
processError "Action Error:%s\n\n%A\n\n%A\n\n%A" e.Message e script ctx
84+
Console.ResetColor ()
85+
-4
7586
| Task.TaskException (task, e) ->
7687
processError "Task Error:%s\n\n%A\n\n%A" e.Message e task
77-
| e -> processError "Error:%A" e
88+
Console.ResetColor ()
89+
-5
90+
| e ->
91+
processError "Error:%A" e
92+
Console.ResetColor ()
93+
-6
94+
95+
96+
7897

0 commit comments

Comments
 (0)