Skip to content

Commit

Permalink
Merge pull request #49 from jessety/dev/jesse/bugfixOffline
Browse files Browse the repository at this point in the history
Bugfix offline installations
  • Loading branch information
jessety authored Jan 22, 2022
2 parents 8835073 + 2c71400 commit 2c8eca5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/windows/setup-packages.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ node src\tools\npm-online.js

if ($? -eq $True) {

# We *can* connect to the npm registry

Write-Host "Installing packages.."

$PriorToInstall = Get-Date
Expand All @@ -35,7 +37,7 @@ if ($? -eq $True) {
Write-Host "Installing packages took $([Math]::Floor($(Get-Date).Subtract($PriorToInstall).TotalSeconds)) seconds."

Write-Host "Linking node-windows.."
npm link node-windows --loglevel=error --no-fund --no-audit --production
npm link node-windows --loglevel=error --no-fund --no-audit --production --only=production

} elseif ((Test-Path $cache_archive_tar) -or (Test-Path $cache_archive_zip) -or (Test-Path $cache_folder)) {

Expand Down Expand Up @@ -111,7 +113,7 @@ if ($? -eq $True) {
Write-Host "Installing packages took $([Math]::Floor($(Get-Date).Subtract($PriorToInstall).TotalSeconds)) seconds."

Write-Host "Linking node-windows.."
npm link node-windows --loglevel=error --no-fund --no-audit --production --offline
npm link node-windows --loglevel=error --no-fund --no-audit --production --only=production --offline

} else {

Expand All @@ -124,7 +126,7 @@ if ($? -eq $True) {
npm install --global --loglevel=error --no-audit --no-fund $node_windows_package

Write-Host "Linking node-windows.."
npm link node-windows --loglevel=error --no-fund --no-audit --production
npm link node-windows --loglevel=error --no-fund --no-audit --production --only=production
}

# Enable execution of pm2's powershell script, so the current user can interact with the pm2 powershell script
Expand Down

0 comments on commit 2c8eca5

Please sign in to comment.