check for an invalid argument combination

This commit is contained in:
Christoph Klaffl 2020-02-13 18:31:56 +01:00
parent 487693993b
commit 4ebdc9d173
No known key found for this signature in database
GPG Key ID: 8FC1D76EED4970D2
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 = ();