Allow specifiying targets and hosts not in the config file.

We no longer care about the source of this information, so there is no
reason to restrict users.
This commit is contained in:
Mark Simulacrum 2017-07-29 22:26:28 -06:00
parent 44ffb61623
commit 84d9a6ee8c

View file

@ -334,21 +334,11 @@ impl Config {
}
}
config.hosts = if !flags.host.is_empty() {
for host in flags.host.iter() {
if !config.hosts.contains(host) {
panic!("specified host `{}` is not in configuration", host);
}
}
flags.host
} else {
config.hosts
};
config.targets = if !flags.target.is_empty() {
for target in flags.target.iter() {
if !config.targets.contains(target) {
panic!("specified target `{}` is not in configuration", target);
}
}
flags.target
} else {
config.targets