From 85bbcaabaa9a7dad261317bebcffd9db6adad57c Mon Sep 17 00:00:00 2001 From: Filip Tibell Date: Sun, 14 May 2023 20:42:19 +0200 Subject: [PATCH] Show deprecation message for generation commands --- packages/cli/src/cli.rs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/cli/src/cli.rs b/packages/cli/src/cli.rs index ce74873..ff4c72e 100644 --- a/packages/cli/src/cli.rs +++ b/packages/cli/src/cli.rs @@ -112,11 +112,18 @@ impl Cli { if self.generate_gitbook_dir { generate_gitbook_dir_from_definitions(&TYPEDEFS_DIR).await?; } - if self.setup - || self.generate_luau_types - || self.generate_selene_types - || self.generate_docs_file + if (self.generate_luau_types || self.generate_selene_types || self.generate_docs_file) + && !self.setup { + 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?; } }