Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

Fix: Detect Bun global install via path check (#8004)

miraclebakelaserf754b19e8050
diff --git a/codex-cli/bin/codex.js b/codex-cli/bin/codex.js
index 138796e5d6..6ec8069bd2 100644
--- a/codex-cli/bin/codex.js
+++ b/codex-cli/bin/codex.js
@@ -95,6 +95,14 @@ function detectPackageManager() {
return "bun";
}
+
+ if (
+ __dirname.includes(".bun/install/global") ||
+ __dirname.includes(".bun\\install\\global")
+ ) {
+ return "bun";
+ }
+
return userAgent ? "npm" : null;
}