File tree Expand file tree Collapse file tree 1 file changed +11
-12
lines changed
Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -95,18 +95,17 @@ module Builder =
9595 <| sprintf " Could not kill process %s %s after timeout." proc.StartInfo.FileName redactedArgs
9696 failwithf " Process %s %s timed out." proc.StartInfo.FileName redactedArgs
9797 proc.WaitForExit()
98- proc.ExitCode
99-
100- let mutable notSigned = true
101- for server in timestampServers do
102- if notSigned then
103- let exitCode = sign server
104- if ( exitCode = 0 ) then
105- notSigned <- false
106- else
107- tracefn " Signing with a timestamp from %s failed with code: %i " server exitCode
108- if notSigned then failwithf " Signing failed"
109- else tracefn " Signing succeeded."
98+ ( timestampServer, proc.ExitCode)
99+
100+ let validExitCode =
101+ timestampServers
102+ |> Seq.map sign
103+ |> Seq.takeWhile ( fun ( server , exitCode ) -> exitCode <> 0 )
104+ |> Seq.tryFind ( fun ( server , exitCode ) -> exitCode = 0 )
105+
106+ match validExitCode with
107+ | Some ( server, exitCode) -> failwithf " Signing with a timestamp from %s failed with code: %i " server exitCode
108+ | None -> tracefn " Signing succeeded."
110109
111110 // Using DotNetZip due to errors with CMAKE zip files: https://github.com/fsharp/FAKE/issues/775
112111 let unzipFile ( zipFolder : string , unzipFolder : string ) =
You can’t perform that action at this time.
0 commit comments