Last active
November 14, 2024 19:31
-
-
Save rleap-m/aa2f30d092c07cf7401ab098c28fb548 to your computer and use it in GitHub Desktop.
This file contains 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
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