Fix aap-passwd argument checking
authorMarius Gavrilescu <marius@ieval.ro>
Fri, 1 May 2015 14:48:02 +0000 (17:48 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Fri, 1 May 2015 14:48:02 +0000 (17:48 +0300)
aap-passwd

index 69d892dce8f9c758aceb91881c98314e16c22f29..ac6a7e901d3dd501fa195deb7880f85ea381c247 100644 (file)
@@ -9,8 +9,8 @@ use Apache2::Authen::Passphrase qw/pwset USER_REGEX/;
 
 use IO::Prompter [qw/-e* -stdio/];
 
-die "Usage: aap-passwd [rootdir] username\n" if @ARGV == 0 || @ARGV > 1;
-($Apache2::Authen::Passphrase::rootdir) = (shift =~ /(.*)/s) if $#ARGV == 1;
+die "Usage: aap-passwd [rootdir] username\n" if @ARGV == 0 || @ARGV > 2;
+($Apache2::Authen::Passphrase::rootdir) = (shift =~ /(.*)/s) if @ARGV == 2;
 
 my $username = shift;
 die "Invalid username\n" unless $username =~ USER_REGEX;
This page took 0.010711 seconds and 4 git commands to generate.