This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository pkg-perl-tools.

commit 6ade1c60fc371da143838b1494339ac8b582648c
Author: gregor herrmann <gre...@debian.org>
Date:   Wed Nov 2 19:19:42 2016 +0100

    dpt-github-oauth: don't display password if Term::ReadLine::Gnu is used.
---
 scripts/github-oauth | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/scripts/github-oauth b/scripts/github-oauth
index 6438b22..a523752 100755
--- a/scripts/github-oauth
+++ b/scripts/github-oauth
@@ -50,7 +50,13 @@ my $term = Term::ReadLine->new('github-oauth');
 my $gh_user = $term->readline( 'GitHub user name >', $ENV{USER} );
 die "GitHub user name is required\n" unless $gh_user;
 
-my $gh_pass = $term->readline( 'GitHub password (not hidden /!\) >', '' );
+# Turn off display for password entry
+# works with Term::ReadLine::Gnu but not with Term::ReadLine::Perl
+my $attribs = $term->Attribs;
+$attribs->{redisplay_function} = $attribs->{shadow_redisplay};
+my $warning = $term->ReadLine eq 'Term::ReadLine::Gnu' ? '' : ' (not hidden 
/!\)';
+
+my $gh_pass = $term->readline( 'GitHub password' . $warning . ' >', '' );
 die "GitHub password is required\n" unless $gh_pass;
 
 my $note = $ARGV[1];

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/pkg-perl-tools.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to