fix wayland display autodetect and add safe update.sh - #4270
Closed
flightlesstux wants to merge 1 commit into
Closed
flightlesstux wants to merge 1 commit into
flightlesstux wants to merge 1 commit into
Conversation
start:wayland defaulted WAYLAND_DISPLAY to wayland-1 when unset, but that's not always the real compositor socket (wayland-0 here), so a saved pm2 env with no WAYLAND_DISPLAY made electron SIGSEGV on every launch. pm2 auto-restarted the crash loop every ~5s, writing a core dump per crash into the repo dir until the disk filled and took git, npm, and pm2 down with it. - start:wayland now probes XDG_RUNTIME_DIR for the actual wayland-* socket before falling back to wayland-0. - add update.sh: checks disk space, cleans stray core dumps, and refuses to run on a dirty working tree before pulling; after npm install it restarts the pm2 process (if any) and rolls back to the pre-update commit if the app crash-loops or dumps core. fixes #1
Collaborator
|
Thanks! You addressed the wrong wayland default already in #4268 , did you read the comments there? I don't think we want additional bash scripts as |
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
start:waylanddefaultedWAYLAND_DISPLAYtowayland-1when unset, but that's not always the real compositor socket, so a saved pm2 env with noWAYLAND_DISPLAYmade electron SIGSEGV on every launch, and pm2 auto-restarted the crash loop every ~5s, filling the disk with core dumps.start:waylandnow probesXDG_RUNTIME_DIRfor the actualwayland-*socket before falling back towayland-0.update.sh: checks disk space, cleans stray core dumps, refuses to run on a dirty working tree before pulling, restarts the pm2 process afternpm install, and rolls back to the pre-update commit if the app crash-loops or dumps core.Fixes #1
Test plan
npm run start:waylandon a system withWAYLAND_DISPLAYunset and confirm the correct socket is detectedupdate.shon a clean and a dirty working tree and confirm expected behavior