Skip to content

Commit

Permalink
fix(scoop-alias,list): Empty aliases listing
Browse files Browse the repository at this point in the history
  • Loading branch information
Ash258 committed Jul 25, 2020
1 parent ef89292 commit 62a6274
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Alias.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ function Get-ScoopAlias {
param([Switch] $Verbose)
$aliases = @()

(Get-AliasesFromConfig).PSObject.Properties.GetEnumerator() | ForEach-Object {
$props = @((Get-AliasesFromConfig).PSObject.Properties | Where-Object -Property MemberType -EQ -Value NoteProperty)
if ($props.Count -eq 0) { $props = @() }

$props.GetEnumerator() | ForEach-Object {
$content = Get-Content (command_path $_.Name)
$cmd = ($content | Select-Object -Skip 1).Trim()
$sum = (summary $content).Trim()
Expand Down

0 comments on commit 62a6274

Please sign in to comment.