Merge pull request #508 from phreaker0/check-arguments

check for an invalid argument combination
This commit is contained in:
Jim Salter 2020-11-01 17:24:29 -05:00 committed by GitHub
commit 14e6c62d0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

10
syncoid
View File

@ -38,6 +38,16 @@ if (length $args{'sendoptions'}) {
pod2usage(2);
exit 127;
}
if (defined $args{'recursive'}) {
foreach my $option(@sendoptions) {
if ($option->{option} eq 'R') {
warn "invalid argument combination, zfs send -R and --recursive aren't compatible!";
pod2usage(2);
exit 127;
}
}
}
}
my @recvoptions = ();