mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
- try to log the install error
This commit is contained in:
@@ -185,14 +185,16 @@ Function Add-NodeAndNpm {
|
||||
|
||||
# Let's install the npm version we really want.
|
||||
Write-Host "Installing npm@${NPM_VERSION}..." -ForegroundColor Magenta
|
||||
& "$tempNpmCmd" install --prefix="$dirLib" --no-bin-links --save `
|
||||
--cache="$dirNpmCache" --nodedir="$dirTempNode" npm@${NPM_VERSION} |
|
||||
Write-Debug
|
||||
$npmOutput = & "$tempNpmCmd" install --prefix="$dirLib" --no-bin-links --save `
|
||||
--cache="$dirNpmCache" --nodedir="$dirTempNode" npm@${NPM_VERSION} 2>&1
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Error installing npm@${NPM_VERSION}:" -ForegroundColor Red
|
||||
Write-Host $npmOutput -ForegroundColor Red
|
||||
throw "Couldn't install npm@${NPM_VERSION}."
|
||||
}
|
||||
|
||||
|
||||
# After finishing up with our Node, let's put it in its final home
|
||||
# and abandon this local npm directory.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user