Skip to content

Commit

Permalink
Update Install-NodeJS.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
RaviAkshintala authored Nov 12, 2024
1 parent a085d7d commit dd06a22
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions images/windows/scripts/build/Install-NodeJS.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@ New-Item -Path $cachePath -Force -ItemType Directory


$defaultVersion = (Get-ToolsetContent).node.default
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/tj/n/master/bin/n" -OutFile "$env:USERPROFILE\n"
\
$gitBashPath = "C:\Program Files\Git\bin\bash.exe" # Path to Git Bash executable
$command = "& `"$gitBashPath`" --login -i -c ""bash ~/n $defaultVersion""" # Running 'n' script with specified version
Invoke-Expression $command
Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/tj/n/master/bin/n' -OutFile '$HOME/n
& '$HOME/n' $env:default_version
Add-MachinePathItem $prefixPath
Expand Down

0 comments on commit dd06a22

Please sign in to comment.