mirror of
https://github.com/samsonjs/arq_restore.git
synced 2026-04-27 15:07:44 +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
|
#pragma mark internal
|
||||||
- (NSString *)readPasswordWithPrompt:(NSString *)thePrompt error:(NSError **)error {
|
- (NSString *)readPasswordWithPrompt:(NSString *)thePrompt error:(NSError **)error {
|
||||||
printf("%s ", [thePrompt UTF8String]);
|
fprintf(stderr, "%s ", [thePrompt UTF8String]);
|
||||||
fflush(stdout);
|
fflush(stderr);
|
||||||
|
|
||||||
struct termios oldTermios;
|
struct termios oldTermios;
|
||||||
struct termios newTermios;
|
struct termios newTermios;
|
||||||
|
|
@ -835,7 +835,6 @@
|
||||||
if (len > 0 && buf[len - 1] == '\n') {
|
if (len > 0 && buf[len - 1] == '\n') {
|
||||||
--len;
|
--len;
|
||||||
}
|
}
|
||||||
printf("\n");
|
|
||||||
|
|
||||||
return [[[NSString alloc] initWithBytes:buf length:len encoding:NSUTF8StringEncoding] autorelease];
|
return [[[NSString alloc] initWithBytes:buf length:len encoding:NSUTF8StringEncoding] autorelease];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue