From 0845648bb36cd3350d5698d19660c25688f01e9b Mon Sep 17 00:00:00 2001 From: relikd Date: Wed, 3 Sep 2025 13:16:20 +0200 Subject: [PATCH] ref: toggle binary only --- brew.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/brew.py b/brew.py index e5d705e..c281ae7 100755 --- a/brew.py +++ b/brew.py @@ -480,11 +480,11 @@ def cli_switch(args: ArgParams) -> None: def cli_toggle(args: ArgParams) -> None: ''' - Enable/disable a single package. + Link/unlink all binaries of a single package. Can be used to switch between versioned packages (e.g. node <-> node@22). ''' pkg = LocalPackage(args.package).assertInstalled() - isActive = bool(pkg.activeVersion) + isActive = bool(pkg.binLinks) baseName = pkg.name.split('@')[0] allVersions = [x for x in Cellar.infoAll() if x.name == baseName or x.name.startswith(baseName + '@')] @@ -1336,7 +1336,7 @@ class LocalPackageVersion: @cached_property def isKegOnly(self) -> bool: - ''' Check if package is keg-only ''' + ''' Parse ruby file to check if package is keg-only ''' return RubyParser(self.rubyPath).parseKegOnly() # Symlink processing