Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix offline installations #49

Merged
merged 1 commit into from
Jan 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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