From aa5f0cc3354076a23f7522e23482c40a393c4b42 Mon Sep 17 00:00:00 2001 From: Lucien Greathouse Date: Tue, 22 May 2018 11:04:53 -0700 Subject: [PATCH] Issue a warning if no partitions are specified during serve. Closes #40 --- CHANGES.md | 1 + server/src/commands/serve.rs | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 8e3a8b203..5ddab829c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,7 @@ ## Current master * Added icons to the Rojo plugin, made by [@Vorlias](https://github.com/Vorlias)! ([#70](https://github.com/LPGhatguy/rojo/pull/70)) +* Server will now issue a warning if no partitions are specified in `rojo serve` ([#40](https://github.com/LPGhatguy/rojo/issues/40)) ## 0.4.6 (May 21, 2018) * Rojo handles being restarted by Roblox Studio more gracefully ([#67](https://github.com/LPGhatguy/rojo/issues/67)) diff --git a/server/src/commands/serve.rs b/server/src/commands/serve.rs index d0c41b5d0..eb841807a 100644 --- a/server/src/commands/serve.rs +++ b/server/src/commands/serve.rs @@ -44,6 +44,13 @@ pub fn serve(project_path: &PathBuf, verbose: bool, port: Option) { }, }; + if project.partitions.len() == 0 { + println!(""); + println!("This project has no partitions and will not do anything when served!"); + println!("This is usually a mistake -- edit rojo.json!"); + println!(""); + } + lazy_static! { static ref PLUGIN_CHAIN: PluginChain = PluginChain::new(vec![ Box::new(ScriptPlugin::new()),