[pkg-perl-tools] 01/01: scripts/forward: fail early if no pause credentials and not using mail
Florian Schlichting
fsfs at moszumanska.debian.org
Sun Oct 16 14:15:31 UTC 2016
This is an automated email from the git hooks/post-receive script.
fsfs pushed a commit to branch master
in repository pkg-perl-tools.
commit 2013b8c7499977067578d9c750487a0ffe5442e1
Author: Florian Schlichting <fsfs at debian.org>
Date: Sun Oct 16 16:14:52 2016 +0200
scripts/forward: fail early if no pause credentials and not using mail
---
scripts/forward | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/scripts/forward b/scripts/forward
index 4744807..77859e1 100755
--- a/scripts/forward
+++ b/scripts/forward
@@ -355,7 +355,8 @@ my %rt_login;
sub read_pause_credentials {
open my $pauserc, '<',
- File::Spec->catfile( File::HomeDir->my_home, '.pause' );
+ File::Spec->catfile( File::HomeDir->my_home, '.pause' )
+ || die 'Could not open ~/.pause, supply credentials or --use-mail instead';
while (<$pauserc>) {
chomp;
@@ -490,6 +491,8 @@ sub send_by_mail {
}
sub submit_cpan_rt {
+ read_pause_credentials();
+
# prepare subject
my $subject = get_subject();
@@ -508,8 +511,6 @@ sub submit_cpan_rt {
$ticket_url = "https://rt.cpan.org/Ticket/Display.html?id=DUMMY";
}
else {
- read_pause_credentials();
-
require RT::Client::REST;
my $rt = RT::Client::REST->new( server => $rt_server );
my $ok = eval {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/pkg-perl-tools.git
More information about the Pkg-perl-cvs-commits
mailing list