mirror of
https://github.com/angt/secret
synced 2024-11-16 19:48:05 +01:00
Skip LF when piping
Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
This commit is contained in:
parent
ddbe7cf3f3
commit
a5d3dd5b4f
1 changed files with 1 additions and 1 deletions
2
secret.c
2
secret.c
|
@ -382,7 +382,7 @@ s_do(int argc, char **argv, void *data)
|
|||
secret[i] = '!' + secret[i] % (1U + '~' - '!');
|
||||
|
||||
s_write(1, secret, len);
|
||||
s_write(1, "\n", 1);
|
||||
if (isatty(1)) s_write(1, "\n", 1);
|
||||
} else {
|
||||
if (!s_input(secret, sizeof(secret), "Secret: "))
|
||||
s_exit(0);
|
||||
|
|
Loading…
Reference in a new issue