@@ -1455,27 +1455,17 @@ type CoreBuildOptions(watch) =
1455
1455
let inPackageLocations = Common.InPackageLocations( Path.Combine( dir, " .." , " .." , " .." ))
1456
1456
let inRepoLocations = Common.InRepoLocations( Path.Combine( dir, " .." , " .." , " .." , " .." , " .." ))
1457
1457
1458
- let defaultTemplateAttempt1 = inPackageLocations.template_ html
1459
- // This is in-repo only
1460
- let defaultTemplateAttempt2 = inRepoLocations.template_ html
1461
-
1462
1458
let defaultTemplate =
1463
1459
if this.nodefaultcontent then
1464
1460
None
1465
1461
else if
1466
- ( try
1467
- File.Exists( defaultTemplateAttempt1)
1468
- with _ ->
1469
- false )
1462
+ inPackageLocations.Exists()
1470
1463
then
1471
- Some defaultTemplateAttempt1
1464
+ Some inPackageLocations.template _ html
1472
1465
elif
1473
- ( try
1474
- File.Exists( defaultTemplateAttempt2)
1475
- with _ ->
1476
- false )
1466
+ inRepoLocations.Exists()
1477
1467
then
1478
- Some defaultTemplateAttempt2
1468
+ Some inRepoLocations.template _ html
1479
1469
else
1480
1470
None
1481
1471
@@ -1484,32 +1474,21 @@ type CoreBuildOptions(watch) =
1484
1474
// The "extras" content goes in "."
1485
1475
// From .nuget\packages\fsdocs-tool\7.1.7\tools\net6.0\any
1486
1476
// to .nuget\packages\fsdocs-tool\7.1.7\extras
1487
- let attempt1 = inPackageLocations.extras
1488
-
1489
- if
1490
- ( try
1491
- Directory.Exists( attempt1)
1492
- with _ ->
1493
- false )
1477
+ if inPackageLocations.Exists()
1494
1478
then
1495
- printfn " using extra content from %s " attempt1
1496
- ( attempt1 , " ." )
1479
+ printfn " using extra content from %s " inPackageLocations.extras
1480
+ ( inPackageLocations.extras , " ." )
1497
1481
else
1498
1482
// This is for in-repo use only, assuming we are executing directly from
1499
1483
// src\fsdocs-tool\bin\Debug\net6.0\fsdocs.exe
1500
1484
// src\fsdocs-tool\bin\Release\net6.0\fsdocs.exe
1501
- let attempt2 = inRepoLocations.docs_ content
1502
-
1503
1485
if
1504
- ( try
1505
- Directory.Exists( attempt2)
1506
- with _ ->
1507
- false )
1486
+ inRepoLocations.Exists()
1508
1487
then
1509
- printfn " using extra content from %s " attempt2
1510
- ( attempt2 , " content" )
1488
+ printfn " using extra content from %s " inRepoLocations.docs _ content
1489
+ ( inRepoLocations.docs _ content , " content" )
1511
1490
else
1512
- printfn " no extra content found at %s or %s " attempt1 attempt2 ]
1491
+ printfn " no extra content found at %s or %s " inPackageLocations.extras inRepoLocations.docs _ content ]
1513
1492
1514
1493
// The incremental state (as well as the files written to disk)
1515
1494
let mutable latestApiDocModel = None
@@ -1573,7 +1552,7 @@ type CoreBuildOptions(watch) =
1573
1552
printfn
1574
1553
" note, no template file '%s ' found, and no default template at '%s '"
1575
1554
templateFiles
1576
- defaultTemplateAttempt1
1555
+ inRepoLocations.template _ html
1577
1556
1578
1557
OutputKind.Html, None
1579
1558
0 commit comments