Repository navigation
fix(installer): fall back to GitHub when packages are missing from native repos - #186
Closed
Elieser007 wants to merge 1 commit into
Closed
Elieser007 wants to merge 1 commit into
Elieser007 wants to merge 1 commit into
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
pacman -Si/dnf info/apt-cache show) before running the install transaction, which previously aborted entirely when a single package was unknown.carapace(binary from carapace-bin releases, verified against the official asset digest from the GitHub API — the same SHA256 the project publishes in its checksums.txt) andzsh-theme-powerlevel10k(cloned to/usr/share/powerlevel10k, a path the bundled.zshrcalready sources).Motivation
On vanilla Arch and Fedora,
carapaceis not in the official repositories, andzsh-theme-powerlevel10kis only present in some repositories (e.g. CachyOS). Runningpacman -S --needed --noconfirm fish carapace zoxide atuin starshipfails entirely witherror: no se ha encontrado el paquete: carapace, aborting the whole shell install step.The runtime availability check means distros that DO provide the packages (CachyOS provides
zsh-theme-powerlevel10k) install them natively; others fall back to GitHub — no hardcoding per distro and no AUR helper dependency.Changes
installer/internal/tui/installer.goGitHubfield toplatformPackages; per-package availability check (packageAvailableInRepo) with graceful degrade to the native manager;installNativeWithGitHubFallback;installCarapaceBinary(latest release resolved via GitHub API, verified against the official digest);installPowerlevel10k; tar.gz binary extraction helper.installer/internal/tui/platform_packages_test.gosystem.Runcontract; tests for missing→GitHub, CachyOS-style native p10k, infra degrade, apt quirks, missing-without-fallback error, and brew fallback.Test Plan
go build ./...passesgo vet ./...passesgo test ./installer/... -skip 'Golden'passes (TestOSSelectGolden is a pre-existing environmental failure on Linux — the golden was generated on macOS; it fails onmainwithout this change too)fishstep installscarapacefrom GitHub and thezshstep installszsh-theme-powerlevel10knatively from the cachyos repo; installer completes successfully