Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/cli/self-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Updates mise itself.

Uses the GitHub Releases API to find the latest release and binary.
By default, this will also update any installed plugins.
Uses the `GITHUB_API_TOKEN` environment variable if set for higher rate limits.
Uses mise's GitHub token resolution chain for authenticated requests.

This command is not available if mise is installed via a package manager.

Expand Down
2 changes: 1 addition & 1 deletion man/man1/mise.1
Original file line number Diff line number Diff line change
Expand Up @@ -2082,7 +2082,7 @@ Updates mise itself.

Uses the GitHub Releases API to find the latest release and binary.
By default, this will also update any installed plugins.
Uses the `GITHUB_API_TOKEN` environment variable if set for higher rate limits.
Uses mise's GitHub token resolution chain for authenticated requests.

This command is not available if mise is installed via a package manager.
.PP
Expand Down
2 changes: 1 addition & 1 deletion mise.usage.kdl
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ cmd search help="Search for tools in the registry" {
arg "[NAME]" help="The tool to search for" required=#false
}
cmd self-update help="Updates mise itself." {
long_help "Updates mise itself.\n\nUses the GitHub Releases API to find the latest release and binary.\nBy default, this will also update any installed plugins.\nUses the `GITHUB_API_TOKEN` environment variable if set for higher rate limits.\n\nThis command is not available if mise is installed via a package manager."
long_help "Updates mise itself.\n\nUses the GitHub Releases API to find the latest release and binary.\nBy default, this will also update any installed plugins.\nUses mise's GitHub token resolution chain for authenticated requests.\n\nThis command is not available if mise is installed via a package manager."
flag "-f --force" help="Update even if already up to date"
flag "-y --yes" help="Skip confirmation prompt"
flag --no-plugins help="Disable auto-updating plugins"
Expand Down
6 changes: 3 additions & 3 deletions src/cli/self_update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub fn append_self_update_instructions(mut message: String) -> String {
///
/// Uses the GitHub Releases API to find the latest release and binary.
/// By default, this will also update any installed plugins.
/// Uses the `GITHUB_API_TOKEN` environment variable if set for higher rate limits.
/// Uses mise's GitHub token resolution chain for authenticated requests.
///
/// This command is not available if mise is installed via a package manager.
#[derive(Debug, Default, clap::Args)]
Expand Down Expand Up @@ -115,8 +115,8 @@ impl SelfUpdate {

fn do_update_blocking(&self) -> Result<Status> {
let mut update = Update::configure();
if let Some(token) = &*env::GITHUB_TOKEN {
update.auth_token(token);
if let Some((token, _)) = crate::github::resolve_token("github.com") {
update.auth_token(&token);
}
#[cfg(windows)]
let bin_path_in_archive = "mise/bin/mise.exe";
Expand Down
Loading