mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 05:07:02 +00:00
* implement first pester tests * add comment for azcopy test * remove extra importing and old function * resolve comments * fix typo
23 lines
583 B
PowerShell
23 lines
583 B
PowerShell
function Take-OutputPart {
|
|
param (
|
|
[Parameter(ValueFromPipeline)]
|
|
[string] $toolOutput,
|
|
[string] $Delimiter = " ",
|
|
[int[]] $Part
|
|
)
|
|
$parts = $toolOutput.Split($Delimiter, [System.StringSplitOptions]::RemoveEmptyEntries)
|
|
$selectedParts = $parts[$Part]
|
|
return [string]::Join($Delimiter, $selectedParts)
|
|
}
|
|
|
|
function New-MDNewLine {
|
|
param (
|
|
[int] $Count = 1
|
|
)
|
|
$newLineSymbol = [System.Environment]::NewLine
|
|
return $newLineSymbol * $Count
|
|
}
|
|
|
|
function Restore-UserOwner {
|
|
sudo chown -R ${env:USER}: $env:HOME
|
|
} |