Skip to content

Commit 89a4524

Browse files
authored
Fix redundant whitespace in CPU name (lptstr#148)
* Fixed lptstr#147 * Refined Trim() call in info_cpu()
1 parent e5cd798 commit 89a4524

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

winfetch.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -689,9 +689,9 @@ function info_theme {
689689
function info_cpu {
690690
$cpu = Get-CimInstance -ClassName Win32_Processor -Property Name,MaxClockSpeed -CimSession $cimSession
691691
$cpuname = if ($cpu.Name.Contains('@')) {
692-
($cpu.Name -Split ' @ ')[0]
692+
($cpu.Name -Split ' @ ')[0].Trim()
693693
} else {
694-
$cpu.Name
694+
$cpu.Name.Trim()
695695
}
696696
$cpufreq = [math]::round((([int]$cpu.MaxClockSpeed)/1000), 2)
697697
return @{

0 commit comments

Comments
 (0)