Show deprecation message for generation commands

This commit is contained in:
Filip Tibell 2023-05-14 20:42:19 +02:00
parent 66aa1fc9ea
commit 85bbcaabaa
No known key found for this signature in database

View file

@ -112,11 +112,18 @@ impl Cli {
if self.generate_gitbook_dir { if self.generate_gitbook_dir {
generate_gitbook_dir_from_definitions(&TYPEDEFS_DIR).await?; generate_gitbook_dir_from_definitions(&TYPEDEFS_DIR).await?;
} }
if self.setup if (self.generate_luau_types || self.generate_selene_types || self.generate_docs_file)
|| self.generate_luau_types && !self.setup
|| self.generate_selene_types
|| self.generate_docs_file
{ {
eprintln!(
"\
Typedef & docs generation files have been superseded by the --setup command.\
Run lune --setup in your terminal to configure typedef files.
"
);
return Ok(ExitCode::FAILURE);
}
if self.setup {
generate_typedef_files_from_definitions(&TYPEDEFS_DIR).await?; generate_typedef_files_from_definitions(&TYPEDEFS_DIR).await?;
} }
} }