When running `zed` [directly from a foreground terminal](https://github.com/zed-industries/zed/issues/51351#issuecomment-4507962670) (stable `zed-editor`, or zed dev builds via `cargo run` as in #51351), Zed only enables the stdout log sink and never creates `Zed.log` on disk. This causes `zed: open log` and `zed: reveal log in file manager` to always failed with `Unable to access/open log file ...: Failed to read file... No such file or directory (os error 2)`. Per maintainer feedback, rather than always creating the log file, this change only registers the `OpenLog` and `RevealLogInFileManager` action handlers when stdout isn't a PTY. In the PTY case the two actions no longer appear in the command palette at all, so they can't be invoked only to error. Repro (before this change): 1. `rm -rf ~/.local/share/zed/logs/` 2. `~/.local/zed.app/libexec/zed-editor` (the GUI binary directly, bypassing the CLI wrapper which detaches and sets `ZED_FORCE_CLI_MODE`) 3. In Zed, run `zed: open log` → error toast Release Notes: - Fixed `zed: open log` and `zed: reveal log in file manager` appearing and erroring when Zed was launched directly from a terminal. These actions are now hidden in that scenario, since logs go to stdout rather than Zed's log file. --------- Co-authored-by: dino <dinojoaocosta@gmail.com>
1 file changedLine totals unavailable