From 44f436d62e67f9e54e1ca5c225584861acf81216 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 5 May 2014 20:21:13 +0000 Subject: [PATCH] ssoma: cleanup IMAP password warnings password may be an empty string, so we must check length. --- ssoma | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/ssoma b/ssoma index edabe5c..a3b0374 100755 --- a/ssoma +++ b/ssoma @@ -161,14 +161,14 @@ sub cmd_add { defined(my $user = $u->user) or die "no user in $dest\n";; x(qw/git config imap.user/, $user); - my $p = $u->password; - warn_imap_pass($ENV{GIT_CONFIG}) if (defined $p); my $path = $u->path; defined $path or $path = "INBOX"; $path =~ s!\A/!!; # no leading slash x(qw/git config imap.folder/, $path); + warn_imap_pass($u->password, $ENV{GIT_CONFIG}); + # this only needs to be set for Extractor to follow local $ENV{GIT_CONFIG} = $state; x(qw/git config/, "target.$target.imap", "true"); @@ -266,10 +266,15 @@ sub x { } sub warn_imap_pass { - my ($file) = @_; - print STDERR <