File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -172,6 +172,27 @@ if ($null -ne $packageType) {
172172 $BuildToolsPath = " ${env: ProgramFiles(x86)} \Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC"
173173
174174 & $rustup default stable
175+
176+ # # Test if Node is installed
177+ # # Skipping upgrade as users may have a specific version they want to use
178+ if (! (Get-Command ' node' - ErrorAction Ignore)) {
179+ Write-Verbose - Verbose " Node.js not found, installing..."
180+ if (! $IsWindows ) {
181+ if (Get-Command ' brew' - ErrorAction Ignore) {
182+ brew install node@24
183+ } else {
184+ Write-Warning " Homebrew not found, please install Node.js manually"
185+ }
186+ }
187+ else {
188+ if (Get-Command ' winget' - ErrorAction Ignore) {
189+ Write-Verbose - Verbose " Using winget to install Node.js"
190+ winget install OpenJS.NodeJS -- accept- source- agreements -- accept- package- agreements -- source winget -- silent
191+ } else {
192+ Write-Warning " winget not found, please install Node.js manually"
193+ }
194+ }
195+ }
175196}
176197
177198if (! $SkipBuild -and ! $SkipLinkCheck -and $IsWindows -and ! (Get-Command ' link.exe' - ErrorAction Ignore)) {
You can’t perform that action at this time.
0 commit comments