This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch fix/apidocs-automation
in repository https://gitbox.apache.org/repos/asf/lucenenet.git


The following commit(s) were added to refs/heads/fix/apidocs-automation by this 
push:
     new bf2188fce docs.ps1: Use actual install directory and set path 
explicitly
bf2188fce is described below

commit bf2188fce243bee9cf828cb777af1306e46172bc
Author: Shad Storhaug <[email protected]>
AuthorDate: Thu Oct 24 09:39:10 2024 +0700

    docs.ps1: Use actual install directory and set path explicitly
---
 websites/apidocs/docs.ps1 | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/websites/apidocs/docs.ps1 b/websites/apidocs/docs.ps1
index a1519f4b8..a930b6402 100644
--- a/websites/apidocs/docs.ps1
+++ b/websites/apidocs/docs.ps1
@@ -69,12 +69,19 @@ $InstallDir = "$RepoRoot/.dotnet/tools"
 $PreviousLocation = Get-Location
 Set-Location $RepoRoot
 
+
 # Ensure docfx is installed
 if (-not (Test-Path "$InstallDir/docfx")) {
     Write-Host "docfx is not installed. Installing as a local tool..."
     
     # Install docfx as a local tool if it isn't listed in dotnet-tools.json
-    dotnet tool install --local docfx
+    $installOutput = dotnet tool install --local docfx -v diag 2>&1
+
+    # Output the installation details to the console
+    Write-Host $installOutput
+
+    # Add the local tool's path to the environment
+    $env:PATH = "$installOutput;$env:PATH"
 } else {
     Write-Host "docfx is already installed. Restoring tools..."
 
@@ -82,9 +89,6 @@ if (-not (Test-Path "$InstallDir/docfx")) {
     dotnet tool restore
 }
 
-# Add the local tool's path to the environment
-$env:PATH = "$InstallDir;$env:PATH"
-
 # Verify that docfx is accessible
 docfx --version
 

Reply via email to