Skip to content

Instantly share code, notes, and snippets.

@rleap-m
Last active November 14, 2024 19:31
Show Gist options
  • Save rleap-m/aa2f30d092c07cf7401ab098c28fb548 to your computer and use it in GitHub Desktop.
Save rleap-m/aa2f30d092c07cf7401ab098c28fb548 to your computer and use it in GitHub Desktop.
function verboseLog {
Write-Verbose "$args"
}
function getContainerdVer {
if (Get-Command "ctr.exe" -ErrorAction SilentlyContinue)
{
$tmp = ctr -v|Out-String
if ($LASTEXITCODE -eq 0) {
$tmp = $tmp.Trim().split(' ',3)
return $tmp[2].Substring(1)
} else {
verboseLog "ctr version returned $LASTEXITCODE"
}
} else {
verboseLog "ctr not in PATH"
}
return ''
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment