feat: support Powershell 5

This commit is contained in:
PIYUSH194 2020-11-30 18:35:59 +05:30 committed by Jan De Dobbeleer
parent 870af53d35
commit 732035dfa1
2 changed files with 2 additions and 2 deletions

View file

@ -21,7 +21,7 @@
# Description of the functionality provided by this module
Description = 'A prompt theme engine for any shell'
# Minimum version of the Windows PowerShell engine required by this module
PowerShellVersion = '6.0'
PowerShellVersion = '5.0'
# List of all files packaged with this module
FileList = @()
# Cmdlets to export from this module

View file

@ -20,7 +20,7 @@ function Get-PoshCommand {
}
# Set the right binary to executable before doing anything else
if (!$IsWindows) {
if ($PSVersionTable.PSEdition -eq "Core" -and !$IsWindows) {
$executable = Get-PoshCommand
Invoke-Expression -Command "chmod +x $executable"
}