Detect Powershell version.

This commit is contained in:
Pieter-Jan Briers
2020-02-18 23:16:23 +01:00
parent b691fd3bf7
commit 9a0a8aebfa

View File

@@ -1890,6 +1890,9 @@ detectshell () {
fish)
shell_version_data=$( fish --version | awk '{print $3}' )
;;
pwsh)
shell_version_data=$( pwsh -c '$PSVersionTable.PSVersion.ToString()' )
;;
esac
if [[ -n $shell_version_data ]];then