mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-29 17:23:08 +00:00
modified depending on comments
This commit is contained in:
parent
8591620a13
commit
80966800e2
@ -819,10 +819,10 @@ sub parse_args {
|
||||
} elsif ($subcommand eq "dump") {
|
||||
my $option = $ARGV[1];
|
||||
if ($option =~ /^-d$|^--download$/) {
|
||||
return ([ 1, "Invalid parameter for $command $option" ]) unless ($ARGV[2]);
|
||||
return ([ 1, "No dump file ID specified" ]) unless ($ARGV[2]);
|
||||
return ([ 1, "Invalid parameter for $command $option $ARGV[2]" ]) if ($ARGV[2] !~ /^\d*$/);
|
||||
} elsif ($option =~ /^-c$|^--clear$/) {
|
||||
return ([ 1, "Invalid parameter for $command $option" ]) unless ($ARGV[2]);
|
||||
return ([ 1, "No dump file ID specified" ]) unless ($ARGV[2]);
|
||||
return ([ 1, "Invalid parameter for $command $option $ARGV[2]" ]) if ($ARGV[2] !~ /^\d*$/ and $ARGV[2] ne "all");
|
||||
} elsif ($option !~ /^-l$|^--list$|^-g$|^--generate$/) {
|
||||
return ([ 1, "Invalid parameter for $command $option" ]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user