mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-13 05:42:59 +00:00
5f29f214c3
Closes #20070 Release Notes: - Fixed issue where files wouldn't open from the file explorer. - Fixed "Open a new workspace" option on the desktop entry right-click menu. Context: Zed consists of two binaries: - `zed` (CLI component, located at `crates/cli/main.rs`) - `zed-editor` (GUI component, located at `crates/zed/main.rs`) When `zed` is used in the terminal, it checks if an existing instance is running. If one is found, it sends data via a socket to open the specified file. Otherwise, it launches a new instance of `zed-editor`. For more details, see the `detect` and `boot_background` functions in `crates/cli/main.rs`. Root Cause: Install process creates directories like `.local/zed.app` and `.local/zed-preview.app`, which contain desktop entries for the corresponding release. For example, `.local/zed.app/share/applications` contains `zed.desktop`. This desktop entry includes a generic `Exec` field, which is correct by default: ```sh Comment=A high-performance, multiplayer code editor. TryExec=zed StartupNotify=true ``` The issue is in the `install.sh` script. This script copies the above desktop file to the common directory for desktop entries (.local/share/applications). During this process, it replaces the `TryExec` value from `zed` with the exact binary path to avoid relying on the shell's PATH resolution and to make it explicit. However, replacement incorrectly uses the path for `zed-editor` instead of the `zed` CLI binary. This results in not opening a file as if you use `zed-editor` directly to do this it will throw `zed is already running` error on production and open new instance on dev. Note: This PR solves it for new users. For existing users, they will either have to update `.desktop` file manually, or use `install.sh` script again. I'm not aware of zed auto-update method, if it runs `install.sh` under the hood. |
||
---|---|---|
.. | ||
danger | ||
flatpak | ||
lib | ||
licenses | ||
terms | ||
update_top_ranking_issues | ||
analyze_highlights.py | ||
bootstrap | ||
build-docker | ||
bump-extension-cli | ||
bump-nightly | ||
bump-zed-minor-versions | ||
bump-zed-patch-version | ||
bundle-linux | ||
bundle-mac | ||
check-licenses | ||
clear-target-dir-if-larger-than | ||
clippy | ||
collab-flamegraph | ||
crate-dep-graph | ||
create-draft-release | ||
create-migration | ||
deploy-collab | ||
deploy-postgrest | ||
determine-release-channel | ||
draft-release-notes | ||
drop-test-dbs | ||
generate-licenses | ||
generate-licenses-csv | ||
generate-terms-rtf | ||
get-crate-version | ||
get-preview-channel-changes | ||
get-pull-requests-since | ||
get-release-notes-since | ||
get-released-version | ||
histogram | ||
import-themes | ||
install-cmake | ||
install-linux | ||
install-mold | ||
install.sh | ||
kube-shell | ||
label_data.json | ||
language-extension-version | ||
linux | ||
metal-debug | ||
prompts | ||
randomized-test-ci | ||
randomized-test-minimize | ||
remote-server | ||
reset_db | ||
run-local-minio | ||
seed-db | ||
shellcheck-scripts | ||
squawk | ||
storybook | ||
symbolicate | ||
trigger-release | ||
uninstall.sh | ||
update-json-schemas | ||
upload-extension-cli | ||
upload-nightly | ||
what-is-deployed | ||
zed-local |