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

defaults: only restart Dock when user is logged in #1012

Merged
merged 1 commit into from
Jul 27, 2024

Conversation

Enzime
Copy link
Collaborator

@Enzime Enzime commented Jul 23, 2024

This can occur if your primary user is not logged in and you try to do a darwin-rebuild switch

echo >&2 "restarting Dock..."
killall Dock
# Only restart Dock if current user is logged in
if pgrep -xu $UID Dock; then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn’t need this with the || true.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather leave it in as it makes the intent of this code more clear (the prerequisite of restarting the Dock is when it is running as the current user)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright; it’ll be a little awkward in a post‐user‐activation world but we can cross that bridge when we come to it.

@emilazy emilazy merged commit 0413754 into LnL7:master Jul 27, 2024
6 checks passed
@Enzime Enzime deleted the fix/dock-not-running branch July 27, 2024 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants