Skip to content

Commit edf481f

Browse files
author
IXLLEGACYIXL
committed
repair build docs
1 parent 5604bd1 commit edf481f

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

BuildDocs.ps1

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,21 +83,24 @@ function Ask-IncludeAPI {
8383
Write-Host ""
8484
Write-Host -ForegroundColor Cyan "Do you want to include API?"
8585
Write-Host ""
86-
Write-Host -ForegroundColor Yellow " [Y] Yes"
86+
Write-Host -ForegroundColor Yellow " [Y] Yes or ENTER"
8787
Write-Host -ForegroundColor Yellow " [N] No"
8888
Write-Host ""
8989

90-
return (Read-Host -Prompt "Your choice (Y/N)").ToLower() -eq "y"
90+
$input = Read-Host -Prompt "Your choice [Y, N, or ENTER (default is Y)]"
91+
92+
return ($input -eq "Y" -or $input -eq "y" -or $input -eq "")
9193
}
9294

9395
function Ask-UseExistingAPI {
9496
Write-Host ""
9597
Write-Host -ForegroundColor Cyan "Do you want to use already generated API metadata?"
9698
Write-Host ""
97-
Write-Host -ForegroundColor Yellow " [Y] Yes"
99+
Write-Host -ForegroundColor Yellow " [Y] Yes or ENTER"
98100
Write-Host -ForegroundColor Yellow " [N] No"
99101
Write-Host ""
100102

103+
$input = Read-Host -Prompt "Your choice [Y, N, or ENTER (default is Y)]"
101104
return (Read-Host -Prompt "Your choice (Y/N)").ToLower() -eq "y"
102105
}
103106

@@ -446,10 +449,16 @@ else {
446449
{
447450
$API = Ask-IncludeAPI
448451

449-
if ($API) {
450-
$ReuseAPI = Ask-UseExistingAPI
451-
}
452+
if ($API)
453+
{
454+
# Check for .yml files
455+
$ymlFiles = Get-ChildItem -Path "en/api/" -Filter "*.yml"
452456

457+
if ($ymlFiles.Count -gt 0)
458+
{
459+
$ReuseAPI = Ask-UseExistingAPI
460+
}
461+
}
453462
} elseif ($isCanceled) {
454463
Write-Host -ForegroundColor Red "Operation canceled by user."
455464
Stop-Transcript

0 commit comments

Comments
 (0)