mirror of
https://github.com/samsonjs/arq_restore.git
synced 2026-03-25 09:25:53 +00:00
prompt for password on stderr instead of stdout
This commit is contained in:
parent
bca557a6e1
commit
105bb1e742
1 changed files with 2 additions and 3 deletions
|
|
@ -811,8 +811,8 @@
|
|||
|
||||
#pragma mark internal
|
||||
- (NSString *)readPasswordWithPrompt:(NSString *)thePrompt error:(NSError **)error {
|
||||
printf("%s ", [thePrompt UTF8String]);
|
||||
fflush(stdout);
|
||||
fprintf(stderr, "%s ", [thePrompt UTF8String]);
|
||||
fflush(stderr);
|
||||
|
||||
struct termios oldTermios;
|
||||
struct termios newTermios;
|
||||
|
|
@ -835,7 +835,6 @@
|
|||
if (len > 0 && buf[len - 1] == '\n') {
|
||||
--len;
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
return [[[NSString alloc] initWithBytes:buf length:len encoding:NSUTF8StringEncoding] autorelease];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue