Last active
May 10, 2018 01:53
-
-
Save benmccallum/61930dcef5c82abec2f1e554c36b8aaa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Param( | |
| [string]$windowsUser, | |
| [string]$sourceRootPath | |
| ) | |
| yarn global add undefender | |
| undefender "C:\Program Files\nodejs" | |
| if (![string]::IsNullOrWhiteSpace(($windowsUser))) { | |
| undefender "C:\Users\$windowsUser\.dotnet\NuGetFallbackFolder" | |
| undefender "C:\Users\$windowsUser\.nuget\packages" | |
| undefender "C:\Users\$windowsUser\AppData\Local\Yarn" | |
| undefender "C:\Users\$windowsUser\AppData\Roaming\npm" | |
| undefender "C:\Users\$windowsUser\AppData\Roaming\npm-cache" | |
| } | |
| if (![string]::IsNullOrWhiteSpace(($sourceRootPath))) { | |
| ((Get-ChildItem -Path $sourceRootPath -Directory -Filter "*node_modules*" -Recurse).FullName | Where-Object { -not $_.Contains("\node_modules\") }) | ForEach-Object { undefender $_ } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment