Skip to content

Improve Linux installation docs to avoid apt does not have a stable CLI interface warning - #10578

Closed
JackPGreen wants to merge 2 commits into
cli:trunkfrom
JackPGreen:Fix-`apt-does-not-have-a-stable-CLI-interface`-warning
Closed

Improve Linux installation docs to avoid apt does not have a stable CLI interface warning#10578
JackPGreen wants to merge 2 commits into
cli:trunkfrom
JackPGreen:Fix-`apt-does-not-have-a-stable-CLI-interface`-warning

Conversation

@JackPGreen

Copy link
Copy Markdown

When using the Linux manual instruction steps from within a script, the following is logged:

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

These installation instructions have been copied into scripts many times.

Migrates apt -> apt-get to address this.

Further reading.

…CLI interface` warning

When using the [Linux manual instruction steps](https://github.com/cli/cli/blob/trunk/docs/install_linux.md#debian-ubuntu-linux-raspberry-pi-os-apt) from within a script, the following is logged:
> WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

These installation have been copied into scripts [many times](https://github.com/search?q=%22sudo+chmod+go%2Br+%2Fetc%2Fapt%2Fkeyrings%2Fgithubcli-archive-keyring.gpg%22+language%3AShell&type=code&l=Shell).

Migrates `apt` -> `apt-get` to address this.

[Further reading](https://askubuntu.com/a/990838).
@JackPGreen
JackPGreen requested a review from a team as a code owner March 11, 2025 11:49
@JackPGreen
JackPGreen requested a review from jtmcg March 11, 2025 11:49
@cliAutomation cliAutomation added the external pull request originating outside of the CLI core team label Mar 11, 2025
@cliAutomation

Copy link
Copy Markdown
Contributor

Hi! Thanks for the pull request. Please ensure that this change is linked to an issue by mentioning an issue number in the description of the pull request. If this pull request would close the issue, please put the word 'Fixes' before the issue number somewhere in the pull request body. If this is a tiny change like fixing a typo, feel free to ignore this message.

@jtmcg
jtmcg removed their request for review March 12, 2025 20:20
@BagToad
BagToad requested review from BagToad and Copilot June 23, 2025 17:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the Linux installation instructions to use apt-get instead of apt in scripted contexts, preventing the “apt does not have a stable CLI interface” warning.

  • Switched all apt update calls to apt-get update
  • Swapped apt install for apt-get install in both wget-check and final install steps
Comments suppressed due to low confidence (2)

docs/install_linux.md:19

  • Consider cleaning up the temporary file after use (e.g., adding && rm $out after the tee command) to avoid leaving artifacts in the working directory.
        && out=$(mktemp) && wget -nv -O$out https://cli.github.com/packages/githubcli-archive-keyring.gpg \

docs/install_linux.md:20

  • [nitpick] You could simplify this step by using sudo mv $out /etc/apt/keyrings/githubcli-archive-keyring.gpg instead of piping through tee, reducing overhead and improving readability.
        && cat $out | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \

@BagToad

BagToad commented Jun 23, 2025

Copy link
Copy Markdown
Member

Hey @JackPGreen 👋

Sorry this got missed. Tyler moved to a different team and this got missed in the transition. I'll work on reviewing this soon.

@BagToad

BagToad commented Jul 25, 2025

Copy link
Copy Markdown
Member

Hey @JackPGreen, sincere apologies for the delay getting to this one and thank you again for working to improve gh 🙏

I discussed this more with the team, and we decided loosely that our intention is for this to be run interactively, so we want to stick to apt for now.

With that in mind, I'll close this out for now. Please feel free to reach out if I misunderstood anything!

Related: #11216

@BagToad BagToad closed this Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external pull request originating outside of the CLI core team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants