From c5295e12c7d1ec71f234dda8a69a0093157b0e64 Mon Sep 17 00:00:00 2001 From: Andinus Date: Mon, 31 Aug 2020 16:55:34 +0530 Subject: Fix options checking options passed via arguments were being ignored. --- leo.pl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/leo.pl b/leo.pl index 4f25186..39dcc9e 100755 --- a/leo.pl +++ b/leo.pl @@ -8,15 +8,17 @@ use IPC::Run3; use Path::Tiny; use Getopt::Long qw/ GetOptions /; -my %options = (); +my %options = ( + encrypt => $ENV{LEO_ENCRYPT}, + sign => $ENV{LEO_SIGN}, + delete => $ENV{LEO_DELETE}, +); + GetOptions( \%options, qw{ verbose encrypt sign delete help } ) or die "Error in command line arguments\n"; -$options{encrypt} = $ENV{LEO_ENCRYPT}; -$options{sign} = $ENV{LEO_SIGN}; -$options{delete} = $ENV{LEO_DELETE}; my $gpg_fingerprint = "D9AE4AEEE1F1B3598E81D9DFB67D55D482A799FD"; my $ymd = ymd(); # YYYY-MM-DD. -- cgit 1.4.1-2-gfad0