Skip to content

Commit

Permalink
fix(scoop-alias): Fix alias initialization (ScoopInstaller#4737)
Browse files Browse the repository at this point in the history
* fix(scoop-alias): Fix alias initialization

* fix(scoop-alias): Remove 'Format-Table'
  • Loading branch information
niheaven authored Feb 14, 2022
1 parent c41cb84 commit 21c5c6e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
- **shim:** Use `-file` instead of `-command` in ps1 script shims ([#4721](https://github.com/ScoopInstaller/Scoop/issues/4721))
- **versions:** Fix wrong version number when only one version dir ([#4679](https://github.com/ScoopInstaller/Scoop/issues/4679))
- **versions:** Get current version from failed installation if possible ([#4720](https://github.com/ScoopInstaller/Scoop/issues/4720), [#4725](https://github.com/ScoopInstaller/Scoop/issues/4725))
- **scoop-alias:** Fix alias initialization ([#4737](https://github.com/ScoopInstaller/Scoop/issues/4737))
- **scoop-checkup:** Skip 'check_windows_defender' when have not admin privileges ([#4699](https://github.com/ScoopInstaller/Scoop/issues/4699))
- **scoop-cleanup:** Remove apps other than current version ([#4665](https://github.com/ScoopInstaller/Scoop/issues/4665))
- **scoop-update:** Skip updating non git buckets ([#4670](https://github.com/ScoopInstaller/Scoop/issues/4670), [#4672](https://github.com/ScoopInstaller/Scoop/issues/4672))
Expand Down
12 changes: 6 additions & 6 deletions libexec/scoop-alias.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ $script:config_alias = 'alias'

function init_alias_config {
$aliases = get_config $script:config_alias
if (!$aliases) {
$aliases = @{}
if ($aliases) {
$aliases
} else {
New-Object -TypeName PSObject
}

return $aliases
}

function add_alias($name, $command) {
Expand Down Expand Up @@ -100,9 +100,9 @@ function list_aliases {
}
$aliases = $aliases.GetEnumerator() | Sort-Object Name
if ($verbose) {
return $aliases | Select-Object Name, Command, Summary | Format-Table -AutoSize -Wrap
return $aliases | Select-Object Name, Command, Summary
} else {
return $aliases | Select-Object Name, Command | Format-Table -AutoSize -hidetablehead -Wrap
return $aliases | Select-Object Name, Command
}
}

Expand Down

0 comments on commit 21c5c6e

Please sign in to comment.