zed-industries/zed · error
cannot find app bundle containing
Error message
cannot find app bundle containing {cli_path:?} What it means
macOS locate_bundle walks up from the CLI executable's path looking for a directory whose extension is .app; it reached the filesystem root without finding one, so the CLI is not running from inside an app bundle.
Solutions
- Invoke the CLI from inside the Zed.app bundle (e.g. symlink the bundled cli binary) so the .app ancestor exists
- Install the CLI via Zed's built-in installer rather than copying the binary elsewhere
- Run the standalone CLI outside bundle-launch mode if Zed.app is not installed
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/cli/src/main.rs:1309 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/ad5db427e41b38b7.
Report an issue: GitHub.
Appendix: source
Thrown at crates/cli/src/main.rs:1309
#[serde(rename = "CFBundleShortVersionString")]
bundle_short_version_string: String,
}
enum Bundle {
App {
app_bundle: PathBuf,
plist: InfoPlist,
},
LocalPath {
executable: PathBuf,
},
}
fn locate_bundle() -> Result<PathBuf> {
let cli_path = std::env::current_exe()?.canonicalize()?;
let mut app_path = cli_path.clone();
while app_path.extension() != Some(OsStr::new("app")) {
anyhow::ensure!(
app_path.pop(),
"cannot find app bundle containing {cli_path:?}"
);
}
Ok(app_path)
}
impl Detect {
pub fn detect(path: Option<&Path>) -> anyhow::Result<impl InstalledApp> {
let bundle_path = if let Some(bundle_path) = path {
bundle_path
.canonicalize()
.with_context(|| format!("Args bundle path {bundle_path:?} canonicalization"))?
} else {
locate_bundle().context("bundle autodiscovery")?
};
match bundle_path.extension().and_then(|ext| ext.to_str()) {View on GitHub (pinned to f4178619ac)