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

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git


The following commit(s) were added to refs/heads/master by this push:
     new d1d9e7e97 Added check to ensure the _site directory exists before 
copying to it
d1d9e7e97 is described below

commit d1d9e7e975ac0b4094a66dd3ca8c973ae7d465ff
Author: Shad Storhaug <[email protected]>
AuthorDate: Fri Oct 25 23:13:52 2024 +0700

    Added check to ensure the _site directory exists before copying to it
---
 websites/site/site.ps1 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/websites/site/site.ps1 b/websites/site/site.ps1
index 660e83448..e6502c06d 100644
--- a/websites/site/site.ps1
+++ b/websites/site/site.ps1
@@ -58,6 +58,10 @@ if ($Clean) {
        Remove-Item (Join-Path -Path $SiteFolder "obj") -force -ErrorAction 
SilentlyContinue
 }
 
+if (!(Test-Path $SiteFolder)) {
+    New-Item $SiteFolder -ItemType Directory
+}
+
 # Copy the .htaccess  & .gitattributes files to the _site directory after 
cleaning
 Copy-Item -Path (Join-Path -Path $SiteFolder ".htaccess") -Destination 
(Join-Path -Path $SiteFolder "_site\.htaccess") -Force
 Copy-Item -Path (Join-Path -Path $SiteFolder ".gitattributes") -Destination 
(Join-Path -Path $SiteFolder "_site\.gitattributes") -Force

Reply via email to