From 3cd4e423d8aa968e19c4e232752e3fdaf1f78253 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Juli=C3=A1n=20Merelo=20Guerv=C3=B3s?= Date: Mon, 7 Dec 2020 13:46:43 +0100 Subject: [PATCH] Adds Perl version detection (#2206) * Adds Perl version detection * Follows @al-cheb advice :+1: --- .../linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 | 5 +++++ .../scripts/SoftwareReport/SoftwareReport.Generator.ps1 | 1 + 2 files changed, 6 insertions(+) diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 index 39e3abc6..a7136a97 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 @@ -49,6 +49,11 @@ function Get-NodeVersion { return "Node $nodeVersion" } +function Get-PerlVersion { + $version = $(perl -e 'print substr($^V,1)') + return "Perl $version" +} + function Get-PythonVersion { $result = Get-CommandResult "python --version" $version = $result.Output | Take-OutputPart -Part 1 diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index f2bf2273..48430736 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -38,6 +38,7 @@ $markdown += New-MDList -Style Unordered -Lines @( (Get-ErlangVersion), (Get-MonoVersion), (Get-NodeVersion), + (Get-PerlVersion), (Get-PythonVersion), (Get-Python3Version), (Get-RubyVersion),