[ubuntu] Adds detection of cpan version (#2488)

* Adds detection of cpan version

The Perl package manager

* Adds detected cpan version

* Updates copypasta
This commit is contained in:
Juan Julián Merelo Guervós
2021-01-20 09:27:55 +01:00
committed by GitHub
parent 9f700144e1
commit c63f698e70
2 changed files with 8 additions and 0 deletions

View File

@@ -91,6 +91,13 @@ function Get-HomebrewVersion {
return "Homebrew $version"
}
function Get-CpanVersion {
$result = Get-CommandResult "cpan --version"
$result.Output -match "version (?<version>\d+\.\d+) " | Out-Null
$cpanVersion = $Matches.version
return "cpan $cpanVersion"
}
function Get-GemVersion {
$result = Get-CommandResult "gem --version"
$result.Output -match "(?<version>\d+\.\d+\.\d+)" | Out-Null