From fb203bee7927da8ea042441bdabff2bcf435d1c5 Mon Sep 17 00:00:00 2001 From: aparnajyothi-y <147696841+aparnajyothi-y@users.noreply.github.com> Date: Thu, 20 Jun 2024 15:30:36 +0530 Subject: [PATCH] Update node-builder.psm1 --- builders/node-builder.psm1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/builders/node-builder.psm1 b/builders/node-builder.psm1 index f0eefa3..08b16c3 100644 --- a/builders/node-builder.psm1 +++ b/builders/node-builder.psm1 @@ -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()