Reject tasks if they contain spaces

This commit is contained in:
Matthias Beyer 2015-11-08 00:09:07 +01:00
parent 8cffdddab2
commit 9f29f0e1b7

View file

@ -116,6 +116,13 @@ fn get_tags<'a>(rt: &Runtime, sub: &ArgMatches<'a, 'a>) -> Option<Vec<String>> {
Some(tags.split(",")
.collect::<Vec<_>>()
.iter()
.filter(|e|
if e.contains(" ") {
warn!("Tag contains spaces: '{}'", e);
true
} else {
false
})
.map(|s| s.to_string())
.collect()
)