Skip to content

Commit

Permalink
added type annotation to System.IO.Path.GetDirectoryName in FAKE scri…
Browse files Browse the repository at this point in the history
…pt (#40)

* added type annotation to System.IO.Path.GetDirectoryName in FAKE script using function composition
  • Loading branch information
Aaronontheweb authored Aug 8, 2019
1 parent dfeb37e commit 12a378c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Target "Protobuf" <| fun _ ->

let result = ExecProcess(fun info ->
info.FileName <- protocPath
info.WorkingDirectory <- (Path.GetDirectoryName (FullName protocPath))
info.WorkingDirectory <- (Path.GetDirectoryName (FullName protocPath):string)
info.Arguments <- args) (System.TimeSpan.FromMinutes 45.0) (* Reasonably long-running task. *)
if result <> 0 then failwithf "protoc failed. %s %s" protocPath args

Expand Down Expand Up @@ -332,9 +332,12 @@ Target "BuildDockerImages" (fun _ ->
|> append "."
|> toText

let composedGetDirName (p:string) =
System.IO.Path.GetDirectoryName p

ExecProcess(fun info ->
info.FileName <- "docker"
info.WorkingDirectory <- Path.GetDirectoryName projectPath
info.WorkingDirectory <- composedGetDirName projectPath
info.Arguments <- args) (System.TimeSpan.FromMinutes 5.0) (* Reasonably long-running task. *)

let runSingleProject project =
Expand Down

0 comments on commit 12a378c

Please sign in to comment.