properly complain about invalid entries in --module-subset

Change-Id: I13ec7a6acdc8a47efea14bfabf0413d8a3570870
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
This commit is contained in:
Oswald Buddenhagen
2016-01-27 15:42:46 +01:00
committed by Frederik Gladhorn
parent 3de19487d9
commit d1d52b5c1e

View File

@@ -337,8 +337,12 @@ sub git_clone_all_submodules
} elsif ($mod eq "obsolete") {
map { $include{$_} = 1; } grep { ($subinits{$_} || 0) eq STS_OBSOLETE } keys %subbases;
} elsif ($mod =~ s/^-//) {
print "Warning: excluding non-existent module '$mod'.\n"
if (!defined($subdirs{$mod}));
delete $include{$mod};
} else {
die("Error: module subset names non-existent '$mod'.\n")
if (!defined($subdirs{$mod}));
$include{$mod} = 1;
}
}