Skip to content

Fix newline for empty prompts#1655

Open
squell wants to merge 1 commit into
mainfrom
fix-newline
Open

Fix newline for empty prompts#1655
squell wants to merge 1 commit into
mainfrom
fix-newline

Conversation

@squell

@squell squell commented Jul 10, 2026

Copy link
Copy Markdown
Member

Closes #1648

Note: this does mean that in irregular exits (e.g. due to ?, or a panic) of prompt_password, the new line would not be printed. But the only irregular that is there is the SIGTSTP/SIGTTIN/SIGTTOU, and actually with this patch the behaviour of those seems closer to ogsudo as well (e.g. ^Z will cause a newline to be printed anyway)

In particular, any I/O errors in read_unbuffered are handled by prompt_password and not propagated.

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.

sudo -S -p '' writes a newline to stderr

1 participant