File tree 1 file changed +5
-7
lines changed 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -25,9 +25,9 @@ if (Get-Command "node.exe" -ErrorAction SilentlyContinue)
25
25
exit
26
26
}
27
27
28
- if (Test-Path " $InstallDir \node.exe" )
28
+ if (Test-Path " .\nodejs \node.exe" )
29
29
{
30
- Write-Host " Node.exe found at $InstallDir "
30
+ Write-Host " Node.exe found at .\nodejs\node.exe "
31
31
exit
32
32
}
33
33
@@ -53,10 +53,8 @@ else {
53
53
[System.IO.Compression.ZipFile ]::ExtractToDirectory(" nodejs.zip" , $tempDir )
54
54
}
55
55
56
- Write-Host " Expanded NodeJs"
57
- New-Item - Path " $InstallDir " - ItemType " directory" - Force
58
- Write-Host " Copying $tempDir \$nodeFile \* to $InstallDir "
59
- Copy-Item " $tempDir \$nodeFile \*" " $InstallDir " - Recurse
56
+ Write-Host " Expanded NodeJs to $tempDir , moving $tempDir \$nodeFile to .\nodejs subdir"
57
+ move $tempDir \$nodeFile nodejs
60
58
if (Test-Path " $InstallDir \node.exe" )
61
59
{
62
60
Write-Host " Node.exe copied to $InstallDir "
67
65
}
68
66
if (Test-Path " package-lock.json" )
69
67
{
70
- $Env: Path += " ;" + $Env: HELIX_CORRELATION_PAYLOAD + " \jdk\bin;" + $Env: CD
68
+ $Env: Path += " ;" + $Env: HELIX_CORRELATION_PAYLOAD + " \jdk\bin;" + $Env: CD + " \nodejs "
71
69
Write-Host " Found package-lock.json, running $InstallDir \npm install"
72
70
Invoke-Expression " $InstallDir \npm.cmd install"
73
71
}
You can’t perform that action at this time.
0 commit comments