Skip to content

Commit

Permalink
Merge pull request #1228 from Stift/FixParamSplit
Browse files Browse the repository at this point in the history
fix parameter split (fixes #1226)
  • Loading branch information
forki committed Apr 27, 2016
2 parents db3139b + cac15ad commit b4d8df4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/FAKE/CommandlineParams.fs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ let printAllParams() = printfn "FAKE.exe [buildScript] [Target] Variable1=Value1

let parseArgs cmdArgs =
let splitter = [| '=' |]
let split (arg:string) =
let pos = arg.IndexOfAny splitter
[| arg.Substring(0, pos); arg.Substring(pos + 1, arg.Length - pos - 1) |]
cmdArgs
|> Seq.skip 1
|> Seq.mapi (fun (i : int) (arg : string) ->
if arg.Contains "=" then
let s = arg.Split splitter
let s = split arg
if s.[0] = "logfile" then addXmlListener s.[1]
s.[0], s.[1]
else if i = 0 then "target", arg
Expand Down

0 comments on commit b4d8df4

Please sign in to comment.