Skip to content

Commit

Permalink
next time we can fix fsprojects#2136
Browse files Browse the repository at this point in the history
  • Loading branch information
matthid authored and BlythMeister committed Oct 13, 2018
1 parent f5bf356 commit cd2b568
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/app/Fake.Core.Process/ProcessUtils.fs
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,23 @@ module ProcessUtils =
let files =
dirs
|> Seq.map (fun (path : string) ->
let dir =
let replacedPath =
path
|> String.replace "[ProgramFiles]" Environment.ProgramFiles
|> String.replace "[ProgramFilesX86]" Environment.ProgramFilesX86
|> String.replace "[SystemRoot]" Environment.SystemRoot
|> DirectoryInfo.ofPath
if not dir.Exists then ""
else
let fi = dir.FullName @@ file
|> FileInfo.ofPath
if fi.Exists then fi.FullName
else "")
try
let dir =
replacedPath
|> DirectoryInfo.ofPath
if not dir.Exists then ""
else
let fi = dir.FullName @@ file
|> FileInfo.ofPath
if fi.Exists then fi.FullName
else ""
with e ->
raise <| exn(sprintf "Error while trying to find files like '%s' in path '%s' (replaced '%s'). Please report this issue to FAKE and reference https://github.com/fsharp/FAKE/issues/2136." file path replacedPath, e))
|> Seq.filter ((<>) "")
|> Seq.cache
files
Expand Down

0 comments on commit cd2b568

Please sign in to comment.