Skip to content

Commit

Permalink
Broaden condition check for Locale cmdlet
Browse files Browse the repository at this point in the history
  • Loading branch information
rashil2000 committed Dec 13, 2021
1 parent f55c29e commit d14361e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions winfetch.ps1
Expand Up @@ -891,12 +891,12 @@ function info_battery {

# ===== LOCALE =====
function info_locale {
# `Get-WinUserLanguageList` has a regression bug on PowerShell v7.1+
# `Get-WinUserLanguageList` has a regression bug on PowerShell Core
# https://github.com/PowerShell/PowerShellModuleCoverage/issues/18
# A slight increase in response time is incurred as a result

$contentstring = $null
if ($PSVersionTable.PSVersion -like "7.1.*") {
if ($PSVersionTable.PSVersion.Major -gt 5) {
Import-Module International -UseWindowsPowerShell -WarningAction SilentlyContinue
$contentstring = "$((Get-WinHomeLocation).HomeLocation) - $((Get-WinUserLanguageList)[0].LocalizedName)"
Remove-Module International
Expand Down

0 comments on commit d14361e

Please sign in to comment.