File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 2626namespace fs = std::filesystem;
2727
2828using namespace std ::string_view_literals;
29+ using namespace std ::string_literals;
2930
3031constexpr auto USAGE = R"docopt( Ecsact Build Command
3132
@@ -187,7 +188,15 @@ auto ecsact::cli::detail::build_command( //
187188 }
188189
189190 for (auto plugin : result->plugins ) {
190- ecsact::codegen::plugin_validate (plugin);
191+ auto validate_result = ecsact::codegen::plugin_validate (plugin);
192+ if (!validate_result.ok ()) {
193+ auto err_msg = " Plugin validation failed for '" + plugin + " '\n " ;
194+ for (auto err : validate_result.errors ) {
195+ err_msg += " - " s + to_string (err) + " \n " ;
196+ }
197+ ecsact::cli::report_error (" {}" , err_msg);
198+ return 1 ;
199+ }
191200 }
192201 }
193202 }
Original file line number Diff line number Diff line change 2222namespace fs = std::filesystem;
2323
2424using namespace std ::string_view_literals;
25+ using namespace std ::string_literals;
2526
2627constexpr auto USAGE = R"docopt( Ecsact Recipe Bundle Command
2728
@@ -109,7 +110,15 @@ auto ecsact::cli::detail::recipe_bundle_command( //
109110 }
110111
111112 for (auto plugin : result->plugins ) {
112- ecsact::codegen::plugin_validate (plugin);
113+ auto validate_result = ecsact::codegen::plugin_validate (plugin);
114+ if (!validate_result.ok ()) {
115+ auto err_msg = " Plugin validation failed for '" + plugin + " '\n " ;
116+ for (auto err : validate_result.errors ) {
117+ err_msg += " - " s + to_string (err) + " \n " ;
118+ }
119+ ecsact::cli::report_error (" {}" , err_msg);
120+ return 1 ;
121+ }
113122 }
114123 }
115124 }
You can’t perform that action at this time.
0 commit comments