Abort if the passed id contains a version part

This commit is contained in:
Matthias Beyer 2016-07-16 20:07:53 +02:00
parent 616858bd28
commit 2646894bd3

View file

@ -52,6 +52,11 @@ fn main() {
let entry_id = rt.cli().value_of("id").unwrap(); // enforced by clap let entry_id = rt.cli().value_of("id").unwrap(); // enforced by clap
if entry_id.contains("~") {
error!("The --id argument does not need the version part");
exit(1);
}
if rt.cli().is_present("versions") { if rt.cli().is_present("versions") {
if let Err(e) = view_versions_of(entry_id, &rt) { if let Err(e) = view_versions_of(entry_id, &rt) {
trace_error(&e); trace_error(&e);