Don't report Tailscale removal as done after a cancelled sudo - #9528
Open
AtypicalMike wants to merge 1 commit into
Open
Don't report Tailscale removal as done after a cancelled sudo#9528AtypicalMike wants to merge 1 commit into
AtypicalMike wants to merge 1 commit into
Conversation
sudo at a password prompt exits 1 on Ctrl+C, not 130. The remove script swallowed that, kept disabling the plugin and web app, and always printed success. Authenticate first, abort with 130 on a cancelled sudo, and only show Done when the command actually succeeded.
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.
Fixes #9526
Cancelling sudo during Remove → Tailscale still printed
Tailscale has been removed., showed green Done!, and disabled the bar plugin / web app / Taildrop receive service. The package andtailscaledstayed installed because the privileged steps never ran.sudoat a password prompt exits 1 on Ctrl+C (PAMconversation failed), not 130. The remove script swallowed that with|| true, kept going, and always echoed success. The presentation wrapper then treated every non-130 exit as success.Remove script: authenticate with
sudo -vbefore any teardown, map a cancelled prompt to exit 130, and stop swallowingsystemctl disablefailure.Presentation: show Done! only on exit 0; on other non-cancel failures show Failed and still wait for a key so the error stays readable.