Skip to content

Commit

Permalink
Fix find nuget.
Browse files Browse the repository at this point in the history
  • Loading branch information
matthid committed May 17, 2018
1 parent 19c7822 commit baec147
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -893,9 +893,13 @@ Target.create "CreateNuGet" (fun _ ->
Project = package.Project + ".x64" }

let nugetExe =
let pref = Path.GetFullPath "packages/build/NuGet.CommandLine/tools/NuGet.exe"
if File.Exists pref then pref
else
let prefs =
[ "packages/build/Nuget.CommandLine/tools/NuGet.exe"
"packages/build/NuGet.CommandLine/tools/NuGet.exe" ]
|> List.map Path.GetFullPath
match Seq.tryFind (File.Exists) prefs with
| Some pref -> pref
| None ->
let rec printDir space d =
for f in Directory.EnumerateFiles d do
Trace.tracefn "%sFile: %s" space f
Expand All @@ -908,7 +912,7 @@ Target.create "CreateNuGet" (fun _ ->
Trace.tracefn "Found %s" e
e
| None ->
pref
prefs |> List.head

for package,description in packages do
let nugetDocsDir = nugetLegacyDir @@ "docs"
Expand Down

0 comments on commit baec147

Please sign in to comment.