Update node-builder.psm1

This commit is contained in:
aparnajyothi-y 2024-06-20 15:30:36 +05:30 committed by GitHub
parent 58f5e6eb61
commit fb203bee79
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -87,8 +87,12 @@ class NodeBuilder {
#>
Write-Host "Create WorkFolderLocation and ArtifactFolderLocation folders"
New-Item -Path $this.WorkFolderLocation -ItemType "directory"
if (-not (Test-Path -path $this.WorkFolderLocation)) {
New-Item -Path $this.WorkFolderLocation -ItemType "directory"
}
if (-not (Test-Path -path $this.ArtifactFolderLocation)) {
New-Item -Path $this.ArtifactFolderLocation -ItemType "directory"
}
Write-Host "Download Node.js $($this.Version) [$($this.Architecture)] executable..."
$binariesArchivePath = $this.Download()