Repository navigation
fix(install): show detected distro in sudo apt Accept prompt - #7324
Conversation
Make the package-install elevation prompt name the detected distro and state that packages come from official apt repos, so users know we are not installing a tarball outside their package manager (unslothai#6207).
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
macOS CI uses bash 3.2, which misparses case arms inside command substitution and fails install.sh at the apt distro helper. Use a plain subshell so the Accept? prompt still works everywhere.
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Reviewed and verified. The installer package prompt did not show which distro was detected, so users could accept an action for the wrong platform. This surfaces the detected distro in the Accept prompt. Confirmed the detected value is displayed and the prompt still gates on user consent. Codex review has no open items. The remaining red CI is pre-existing upstream breakage (Core HF/TRL) unrelated to this change. Good to merge. |
Fixes #6207
Problem
When
install.shneeds missing build deps (e.g.libcurl4-openssl-dev), the sudo Accept prompt only says elevated permissions are required. Users cannot tell whether Unsloth recognized their distro, or whether it might install a tarball outside the system package manager instead of using the distro's official repos.Fix
install.sh: Add_apt_distro_description()(reads/etc/os-release) and update the_smart_apt_installAccept prompt to name the detected distro (e.g.Ubuntu 24.04 (debian-like)) and state thatsudo apt-getinstalls from the distro's official repositories, not a third-party tarball.tests/sh/test_apt_distro_prompt.sh: Hermetic coverage for the helper plus a prompt-text contract check.Verification
10/10 assertions pass. Live check on Ubuntu 24.04:
Ubuntu 24.04 (debian-like).Compatibility
sudo apt-get update/install._smart_apt_install).NEED_SUDOexit path is unchanged.