Closed samusz closed 3 years ago
Good point. Skipping unsupported managers by default will speed things up.
Here is the result of my current private implementation. See how apt
, flatpak
, etc. are ignored by default:
$ mpm managers
┌────────────────────┬──────────┬───────────┬────────────────────────────┬────────────┬───────────┐
│ Package manager │ ID │ Supported │ CLI │ Executable │ Version │
├────────────────────┼──────────┼───────────┼────────────────────────────┼────────────┼───────────┤
│ Atom's apm │ apm │ ✓ │ ✓ /usr/local/bin/apm │ ✓ │ ✓ 2.6.2 │
│ Homebrew Formulae │ brew │ ✓ │ ✓ /usr/local/bin/brew │ ✓ │ ✓ 3.2.13 │
│ Homebrew Cask │ cask │ ✓ │ ✓ /usr/local/bin/brew │ ✓ │ ✓ 3.2.13 │
│ PHP's Composer │ composer │ ✓ │ ✓ /usr/local/bin/composer │ ✓ │ ✓ 2.1.8 │
│ Ruby Gems │ gem │ ✓ │ ✓ /usr/bin/gem │ ✓ │ ✓ 3.0.3 │
│ Mac AppStore │ mas │ ✓ │ ✓ /usr/local/bin/mas │ ✓ │ ✓ 1.8.3 │
│ Node's npm │ npm │ ✓ │ ✓ /usr/local/bin/npm │ ✓ │ ✓ 7.24.0 │
│ Pip │ pip │ ✓ │ ✓ /usr/local/bin/python3 │ ✓ │ ✓ 21.2.4 │
│ Visual Studio Code │ vscode │ ✓ │ ✓ /usr/local/bin/code │ ✓ │ ✓ 1.60.2 │
│ Node's yarn │ yarn │ ✓ │ ✘ yarn not found │ │ │
└────────────────────┴──────────┴───────────┴────────────────────────────┴────────────┴───────────┘
$ mpm -a managers
error: The operation couldn’t be completed. Unable to locate a Java Runtime that supports apt.
error: Please visit http://www.java.com for information on installing Java.
error:
error: The operation couldn’t be completed. Unable to locate a Java Runtime that supports apt.
error: Please visit http://www.java.com for information on installing Java.
error:
┌────────────────────┬──────────┬───────────────┬────────────────────────────┬────────────┬───────────┐
│ Package manager │ ID │ Supported │ CLI │ Executable │ Version │
├────────────────────┼──────────┼───────────────┼────────────────────────────┼────────────┼───────────┤
│ Atom's apm │ apm │ ✓ │ ✓ /usr/local/bin/apm │ ✓ │ ✓ 2.6.2 │
│ APT │ apt │ ✘ Linux only │ ✓ /usr/bin/apt │ ✓ │ ✘ │
│ Linux Mint's apt │ apt-mint │ ✘ Linux only │ ✓ /usr/bin/apt │ ✓ │ ✘ │
│ Homebrew Formulae │ brew │ ✓ │ ✓ /usr/local/bin/brew │ ✓ │ ✓ 3.2.13 │
│ Homebrew Cask │ cask │ ✓ │ ✓ /usr/local/bin/brew │ ✓ │ ✓ 3.2.13 │
│ PHP's Composer │ composer │ ✓ │ ✓ /usr/local/bin/composer │ ✓ │ ✓ 2.1.8 │
│ Flatpak │ flatpak │ ✘ Linux only │ ✘ flatpak not found │ │ │
│ Ruby Gems │ gem │ ✓ │ ✓ /usr/bin/gem │ ✓ │ ✓ 3.0.3 │
│ Mac AppStore │ mas │ ✓ │ ✓ /usr/local/bin/mas │ ✓ │ ✓ 1.8.3 │
│ Node's npm │ npm │ ✓ │ ✓ /usr/local/bin/npm │ ✓ │ ✓ 7.24.0 │
│ OPKG │ opkg │ ✘ Linux only │ ✘ opkg not found │ │ │
│ Pip │ pip │ ✓ │ ✓ /usr/local/bin/python3 │ ✓ │ ✓ 21.2.4 │
│ Snap │ snap │ ✘ Linux only │ ✘ snap not found │ │ │
│ Visual Studio Code │ vscode │ ✓ │ ✓ /usr/local/bin/code │ ✓ │ ✓ 1.60.2 │
│ Node's yarn │ yarn │ ✓ │ ✘ yarn not found │ │ │
└────────────────────┴──────────┴───────────────┴────────────────────────────┴────────────┴───────────┘
I'll commit this upstream soon.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
"Linux only" package-managers shouldn't be cheked for their presence on macOS.
This would speed up
mpm
use."Linux only" package-managers are:
apt
flatpack
opkg
andsnap