diff options
Diffstat (limited to 'install-win.ps1')
| -rw-r--r-- | install-win.ps1 | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/install-win.ps1 b/install-win.ps1 index 632c25e..15f39e4 100644 --- a/install-win.ps1 +++ b/install-win.ps1 | |||
| @@ -75,8 +75,22 @@ function Copy-Npmrc { | |||
| 75 | return | 75 | return |
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | Write-Step "npm\npmrc -> $NpmrcDst" | 78 | # npm/npmrc setzt "prefix=${HOME}/.local", damit globale npm-Installationen |
| 79 | Copy-Item -Force $NpmrcSrc $NpmrcDst | 79 | # unter POSIX ohne sudo/root ins Home-Verzeichnis gehen. HOME ist unter |
| 80 | # Windows i.d.R. nicht gesetzt, ${HOME} wuerde also nicht expandieren. | ||
| 81 | # Der Grund fuer die Einstellung entfaellt unter Windows ohnehin (npm | ||
| 82 | # nutzt dort schon von Haus aus %APPDATA%\npm, automatisch im PATH) - | ||
| 83 | # die Zeile wird beim Kopieren einfach auskommentiert, statt eine zweite | ||
| 84 | # npmrc-Datei zu pflegen. | ||
| 85 | Write-Step "npm\npmrc -> $NpmrcDst (prefix-Zeile auskommentiert)" | ||
| 86 | $lines = Get-Content -Path $NpmrcSrc | ForEach-Object { | ||
| 87 | if ($_ -match "^\s*prefix\s*=") { | ||
| 88 | "; $_ (unter Windows auskommentiert, siehe install-win.ps1: Copy-Npmrc)" | ||
| 89 | } else { | ||
| 90 | $_ | ||
| 91 | } | ||
| 92 | } | ||
| 93 | Set-Content -Path $NpmrcDst -Value $lines | ||
| 80 | Write-Ok $NpmrcDst | 94 | Write-Ok $NpmrcDst |
| 81 | } | 95 | } |
| 82 | 96 | ||
