Skip to content

Commit

Permalink
Error on empty module names list
Browse files Browse the repository at this point in the history
Closes #15
  • Loading branch information
michaelsproul committed Jun 19, 2019
1 parent 50131d1 commit d8bda82
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,12 @@ fn main_with_result() -> Result<(), String> {
let opts = Opts::from_args();
debug!("{:?}", opts);

if opts.module_names.is_empty() {
return Err(format!(
"You must provide at least one module name to build, see --module-names and --help"
));
}

let tera = load_build_templates()?;

let mut module_templates = collect_modules(&opts.module_names, &opts.search_dirs)?;
Expand Down

0 comments on commit d8bda82

Please sign in to comment.