From d16b607d70799284aeb528599d4e99fe7f6437f8 Mon Sep 17 00:00:00 2001 From: Mike Cardwell Date: Thu, 24 Feb 2011 10:50:19 +0000 Subject: [PATCH] Exit with an error status code if the arguments are invalid --- gpgit.pl | 1 + 1 file changed, 1 insertion(+) mode change 100644 => 100755 gpgit.pl diff --git a/gpgit.pl b/gpgit.pl old mode 100644 new mode 100755 index f78a2aa..7daef52 --- a/gpgit.pl +++ b/gpgit.pl @@ -27,6 +27,7 @@ use MIME::Parser; ## Parse args my $recipient_email = $ARGV[0]||''; + die "Bad arguments. Must supply a valid email address" unless $recipient_email =~ /^.+\@.+$/; ## Object for GPG encryption my $gpg = new Mail::GnuPG();