Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop suggesting auto-update when installed via Homebrew #13825

Open
1 task done
Peiffap opened this issue Jul 4, 2024 · 6 comments
Open
1 task done

Stop suggesting auto-update when installed via Homebrew #13825

Peiffap opened this issue Jul 4, 2024 · 6 comments
Labels
admin read Pending admin review defect [core label] triage Maintainer needs to classify the issue

Comments

@Peiffap
Copy link
Contributor

Peiffap commented Jul 4, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

Whenever a new update is available, the "Click here to update and restart" (probably paraphrased) notification shows up in the bottom left corner. When I click it, Zed closes and updates, but does not automatically restart.

Environment

Zed: v0.142.5 (Zed) -- technically, this is after the update, but I was on the latest version before that.
OS: macOS 12.7.5
Memory: 8 GiB
Architecture: x86_64

If applicable, add mockups / screenshots to help explain present your vision of the feature

I would want the application to automatically restart after the update is completed, reopening the same window I was on when I updated.

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

https://github.com/user-attachments/files/16099398/Zed.log

@Peiffap Peiffap added admin read Pending admin review defect [core label] triage Maintainer needs to classify the issue labels Jul 4, 2024
@mrnugget
Copy link
Member

mrnugget commented Jul 4, 2024

How did you install Zed originally? Downloading the *.dmg?

Can you paste the logs contents too?

@Peiffap
Copy link
Contributor Author

Peiffap commented Jul 4, 2024

I've added the logs to the issue message. I'm fairly confident I downloaded the *.dmg originally, but I don't exclude the possibility I installed through Homebrew (I have Zed brewed too but it was still on version 0.140.5, so it's not the version I've been using).

@Peiffap
Copy link
Contributor Author

Peiffap commented Jul 4, 2024

Actually, on second thought it might've been the brewed version; I'll uninstall everything and see what happens when I reinstall from the *.dmg.

@Peiffap
Copy link
Contributor Author

Peiffap commented Jul 4, 2024

Okay; that seems to work fine (i.e. downloaded v0.142.4, which restarts properly after updating to v0.142.5). I'm not sure what the issue was, but I'm assuming it must be something about Homebrew versions not liking the way updating works?

@mrnugget mrnugget changed the title Zed update ("Click here to update and restart") doesn't automatically restart Stop suggesting auto-update when installed via Homebrew Jul 4, 2024
@mrnugget
Copy link
Member

mrnugget commented Jul 4, 2024

Okay; that seems to work fine (i.e. downloaded v0.142.4, which restarts properly after updating to v0.142.5). I'm not sure what the issue was, but I'm assuming it must be something about Homebrew versions not liking the way updating works?

Yeah, I'd say so. When we download an update, we download the *.dmg, mount it and copy its contents to the current installation location. I don't think that works well when installed via Homebrew and its symlinks.

Officially we don't support the Homebrew version of Zed, but we should probably not show the auto-update if we can detect that it was installed via Homebrew.

We already have support for that:

if let Some(message) = option_env!("ZED_UPDATE_EXPLANATION") {
drop(cx.prompt(
gpui::PromptLevel::Info,
"Zed was installed via a package manager.",
Some(message),
&["Ok"],
));
return;
}

So the homebrew version would need to set ZED_UPDATE_EXPLANATION when compiling or when starting Zed.

@Peiffap
Copy link
Contributor Author

Peiffap commented Jul 4, 2024

That makes sense to me.
Thanks for taking a look at this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin read Pending admin review defect [core label] triage Maintainer needs to classify the issue
Projects
None yet
Development

No branches or pull requests

2 participants