Skip to content

Commit

Permalink
choco fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
sharpninja committed Jun 21, 2023
1 parent 01e3cc7 commit 6b03807
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 14 deletions.
23 changes: 21 additions & 2 deletions PackageManagers.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -823,11 +823,30 @@ class ChocoManager : PackageManager
{
}

[Object[]]AddParameters([string]$Command, [Switch]$Global, [Object[]]$params)
{
if ($Command -imatch 'list')
{
$params += '-l';
}

return $params;
}

[ResultItem]ParseResultItem([string]$Line, [string]$Command, [Switch]$Global)
{
if ($line.IndexOf('[Approved]') -gt -1)
if($Line.Trim().IndexOf('packages installed.') -gt -1){
return $null;
}

$index = $line.IndexOf('[Approved]');
if (($Command -imatch 'search' -and $index -gt -1) -or
-not($Command -imatch 'search'))
{
$line = $line.Substring(0, $line.IndexOf('[Approved]')).Trim();
if($index -gt -1){
$line = $line.Substring(0, $line.IndexOf('[Approved]')).Trim();
}

$lastIndex = $line.LastIndexOf(' ');
$nme = $line.Substring(0, $lastIndex).Trim();
$ver = $line.Substring($lastIndex).Trim();
Expand Down
3 changes: 0 additions & 3 deletions docs/_config.yml

This file was deleted.

1 change: 0 additions & 1 deletion docs/assets/css/style.scss

This file was deleted.

8 changes: 0 additions & 8 deletions docs/data/mydoc_sidebar.yml

This file was deleted.

0 comments on commit 6b03807

Please sign in to comment.