feat: suppress already-installed output for apt, homebrew, and mise - #186
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When running
selfishell update(orupdate --tools-only,install), packages and tools that are already installed previously printed verbose status lines on every run:Already installed apt packages (10): ...andAlready installed apt packages (2): ...Already installed Homebrew formula/cask (N): ...mise <tool>@<version> ⇢ already installedfor each configured runtimeIn accordance with Selfishell's UX principle of suppressing unchanged/already-up-to-date output (similar to Neovim plugins, direct dependencies, and managed files/links), this PR silences these messages when everything is already installed:
Apt / Homebrew:
Already installed apt packagesandAlready installed Homebrewconsole outputs and unused tracking arrays.mise:
mise -q install --dry-run-code "$@".exit 0),install_mise_toolsreturns immediately without printing⇢ already installedlines.mise install, which either installs missing tools or surfaces the real error.Verification
test_apt_suppresses_already_installed_outputandtest_homebrew_suppresses_already_installed_outputintests/package_adapters_test.bashtest_installs_declared_mise_tools_with_managed_configintests/installers_test.bashto verify the preflight-to-fallback execution sequence when tools need installingtest_skips_mise_install_when_tools_are_already_installedintests/installers_test.bashto verify preflight success skips the install phasebash scripts/check.sh) locally: syntax, shellcheck, shfmt, and all test suites pass with 0 failures.