[Windows] Rework NodeJS install (#4375)

This commit is contained in:
Nikolay Frolov
2021-10-30 14:03:05 +03:00
committed by GitHub
parent 64b553b5d0
commit 234919982e
5 changed files with 17 additions and 1 deletions

View File

@@ -10,7 +10,8 @@ $CachePath = 'C:\npm\cache'
New-Item -Path $PrefixPath -Force -ItemType Directory
New-Item -Path $CachePath -Force -ItemType Directory
Choco-Install -PackageName nodejs-lts -ArgumentList "--force"
$defaultVersion = (Get-ToolsetContent).node.default
Choco-Install -PackageName nodejs -ArgumentList "--version=$defaultVersion"
Add-MachinePathItem $PrefixPath
$env:Path = Get-MachinePath