Skip to content

Commit

Permalink
Not sure why I didnt do this to begin with..
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanbergstrom committed Mar 16, 2024
1 parent 82b5ed3 commit 9253f4e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/AnyPackage.Homebrew.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ class HomebrewProvider : PackageProvider, IGetSource, ISetSource, IGetPackage, I
}

[void] UnregisterSource([SourceRequest] $Request) {
$source = Get-HomebrewTap | Where-Object {$_.Name -Like $Request.Name} | Get-HomebrewTapInfo
Croze\Unregister-HomebrewTap -Name $Request.Name
$sourceInfo = [PackageSourceInfo]::new($source.Name, ($source.Remote ?? $source.Path), $this.ProviderInfo)
$Request.WriteSource($sourceInfo)
Get-HomebrewTap | Where-Object {$_.Name -Like $Request.Name} | Get-HomebrewTapInfo | ForEach-Object {
Croze\Unregister-HomebrewTap -Name $_.Name
$sourceInfo = [PackageSourceInfo]::new($_.Name, ($_.Remote ?? $_.Path), $this.ProviderInfo)
$Request.WriteSource($sourceInfo)
}
}

[void] SetSource([SourceRequest] $Request) {
Expand Down

0 comments on commit 9253f4e

Please sign in to comment.