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