Skip to content

Commit 49bca09

Browse files
committed
Disable Bun self-update action
1 parent da3e87d commit 49bca09

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

codex-rs/tui/src/update_action.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ use codex_install_context::StandalonePlatform;
88
pub enum UpdateAction {
99
/// Update via `npm install -g @openai/codex@latest`.
1010
NpmGlobalLatest,
11-
/// Update via `bun install -g @openai/codex@latest`.
12-
BunGlobalLatest,
1311
/// Update via `brew upgrade codex`.
1412
BrewUpgrade,
1513
/// Update via `curl -fsSL https://chatgpt.com/codex/install.sh | sh`.
@@ -23,7 +21,7 @@ impl UpdateAction {
2321
pub(crate) fn from_install_context(context: &InstallContext) -> Option<Self> {
2422
match context {
2523
InstallContext::Npm => Some(UpdateAction::NpmGlobalLatest),
26-
InstallContext::Bun => Some(UpdateAction::BunGlobalLatest),
24+
InstallContext::Bun => None,
2725
InstallContext::Brew => Some(UpdateAction::BrewUpgrade),
2826
InstallContext::Standalone { platform, .. } => Some(match platform {
2927
StandalonePlatform::Unix => UpdateAction::StandaloneUnix,
@@ -39,9 +37,6 @@ impl UpdateAction {
3937
UpdateAction::NpmGlobalLatest => {
4038
("npm", &["install", "-g", "@codex-infinity/codex-infinity"])
4139
}
42-
UpdateAction::BunGlobalLatest => {
43-
("bun", &["install", "-g", "@codex-infinity/codex-infinity"])
44-
}
4540
UpdateAction::BrewUpgrade => ("brew", &["upgrade", "--cask", "codex"]),
4641
UpdateAction::StandaloneUnix => (
4742
"sh",
@@ -87,7 +82,7 @@ mod tests {
8782
);
8883
assert_eq!(
8984
UpdateAction::from_install_context(&InstallContext::Bun),
90-
Some(UpdateAction::BunGlobalLatest)
85+
None
9186
);
9287
assert_eq!(
9388
UpdateAction::from_install_context(&InstallContext::Brew),

codex-rs/tui/src/updates.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ async fn check_for_update(version_file: &Path, action: Option<UpdateAction>) ->
9797
.await?;
9898
version
9999
}
100-
Some(UpdateAction::NpmGlobalLatest) | Some(UpdateAction::BunGlobalLatest) => {
100+
Some(UpdateAction::NpmGlobalLatest) => {
101101
let latest_version = fetch_latest_github_release_version().await?;
102102
let package_info = create_client()
103103
.get(npm_registry::PACKAGE_URL)

0 commit comments

Comments
 (0)