Skip to content

Commit

Permalink
Force homebrew tests to use specific prefix path.
Browse files Browse the repository at this point in the history
  • Loading branch information
marshallwp committed Sep 25, 2024
1 parent ba795aa commit db8c07d
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Describe "Test-CLIVersion" {
switch($Source) {
"brew" {
function brew { return $null }
$env:HOMEBREW_PREFIX = "/home/linuxbrew/.linuxbrew" # Sets HOMEBREW_PREFIX to what is expected from the Mocked bw.
Mock -CommandName "brew" -ParameterFilter {$args[0] -eq "list" -and $args[1] -eq "bitwarden-cli" -and $args[2] -eq "--versions"} `
-MockWith { return Import-Clixml -Path (Join-Path $PSScriptRoot "mock-cli" "response" "brew-list.xml")} -Verifiable
}
Expand Down

0 comments on commit db8c07d

Please sign in to comment.