From cac15adfe7b63c5ad2eb17783b76a81966bf191b Mon Sep 17 00:00:00 2001 From: Christian Fiebrig Date: Tue, 26 Apr 2016 23:46:31 +0200 Subject: [PATCH] fix parameter split (fixes #1226) --- src/app/FAKE/CommandlineParams.fs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/FAKE/CommandlineParams.fs b/src/app/FAKE/CommandlineParams.fs index 85ea53be5ac..dffaee33860 100644 --- a/src/app/FAKE/CommandlineParams.fs +++ b/src/app/FAKE/CommandlineParams.fs @@ -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