From b387e479071dc4698854323b323992c7e92ac34a Mon Sep 17 00:00:00 2001 From: Daniel Martinez Date: Wed, 10 Mar 2021 14:13:25 +0200 Subject: [PATCH] use get_language_plugin to check for antplugin in prepare stub --- tmc-langs-util/src/task_executor.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tmc-langs-util/src/task_executor.rs b/tmc-langs-util/src/task_executor.rs index 0ed455bc7ee..3675eedcb14 100644 --- a/tmc-langs-util/src/task_executor.rs +++ b/tmc-langs-util/src/task_executor.rs @@ -34,7 +34,8 @@ pub fn prepare_stub(exercise_path: &Path, dest_path: &Path) -> Result<(), UtilEr submission_processing::prepare_stub(&exercise_path, dest_path)?; // The Ant plugin needs some additional files to be copied over. - if AntPlugin::is_exercise_type_correct(&exercise_path) { + let plugin = get_language_plugin(&exercise_path)?; + if let Plugin::Ant(..) = plugin { AntPlugin::copy_tmc_junit_runner(dest_path).map_err(|e| TmcError::Plugin(Box::new(e)))?; } Ok(())