Files
Simone 1c1defad87 Fix codexbar cost SIGSEGV on Linux (Bundle.allBundles in isRunningTests) (#3059)
* Fix `cost` SIGSEGV on Linux by gating Bundle.allBundles to macOS

isRunningTests falls back to Bundle.allBundles to detect loaded .xctest
bundles. On Linux (swift-corelibs-foundation) Bundle.allBundles crashes in
_CFIsSwift (via CFBundleGetAllBundles -> CFArrayGetCount), so `codexbar cost`
segfaults before producing output. On Linux, detect the test process from the
main executable path instead: SwiftPM builds test executables with a `.xctest`
suffix, so the intent survives without enumerating bundles. macOS behavior is
unchanged.

Fixes #3058

* Fix remaining Bundle.allBundles fallback in OpenCodexUsage on Linux

---------

Co-authored-by: Lucenx9 <185146821+Lucenx9@users.noreply.github.com>
2026-08-19 08:36:28 -07:00
..