Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homebrew packages can't be asserted via the host.package module on Linux #788

Open
coaxial opened this issue Feb 10, 2025 · 0 comments
Open

Comments

@coaxial
Copy link

coaxial commented Feb 10, 2025

Would it be possible to make it work for Linux too? It only works for macOS at the moment.

As an alternative if this helps anyone, I am doing this:

# host.package doesn't work with homebrew packages on Linux
def test_homebrew_packages(host):
    packages = {
        'git-delta': re.compile(r'delta \d+\.\d+\.\d+', re.M),
        'hub': re.compile(r'hub version .*', re.M),
    }

    for package, version_re in packages.items():
        version = host.run("bash -l -c " + package + " --version").stdout

        assert version_re.match(version)

Not as robust as using the package module but better than nothing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant