add common helpers

This commit is contained in:
Dmitry Shibanov
2020-05-29 15:24:03 +03:00
parent 7c335a2ccc
commit 00f276c05e
18 changed files with 548 additions and 175 deletions

View File

@@ -0,0 +1,13 @@
param (
[string] $ToolName
)
$targetPath = $env:AGENT_TOOLSDIRECTORY
if ($ToolName) {
$targetPath = Join-Path $targetPath $ToolName
}
if (Test-Path $targetPath) {
Get-ChildItem -Path $targetPath -Recurse | Where-Object { $_.LinkType -eq "SymbolicLink" } | ForEach-Object { $_.Delete() }
Remove-Item -Path $targetPath -Recurse -Force
}