mirror of
https://github.com/moparisthebest/gpgit
synced 2024-11-11 11:45:00 -05:00
Exit with an error status code if the arguments are invalid
This commit is contained in:
parent
b3d4732b28
commit
d16b607d70
1
gpgit.pl
Normal file → Executable file
1
gpgit.pl
Normal file → Executable file
@ -27,6 +27,7 @@ use MIME::Parser;
|
|||||||
|
|
||||||
## Parse args
|
## Parse args
|
||||||
my $recipient_email = $ARGV[0]||'';
|
my $recipient_email = $ARGV[0]||'';
|
||||||
|
die "Bad arguments. Must supply a valid email address" unless $recipient_email =~ /^.+\@.+$/;
|
||||||
|
|
||||||
## Object for GPG encryption
|
## Object for GPG encryption
|
||||||
my $gpg = new Mail::GnuPG();
|
my $gpg = new Mail::GnuPG();
|
||||||
|
Loading…
Reference in New Issue
Block a user