Commit 12284f1 1 parent eed4351 commit 12284f1 Copy full SHA for 12284f1
File tree 1 file changed +13
-0
lines changed
src/main/java/com/b2international/rf2
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 23
23
import java .util .List ;
24
24
import java .util .stream .Collectors ;
25
25
26
+ import com .b2international .rf2 .model .RF2Directory ;
26
27
import com .b2international .rf2 .model .RF2File ;
27
28
import com .b2international .rf2 .spec .RF2ReleaseSpecification ;
28
29
import com .b2international .rf2 .spec .RF2Specification ;
@@ -99,6 +100,18 @@ public void doRun() throws Exception {
99
100
sources = Collections .emptyList ();
100
101
}
101
102
103
+ boolean validSources = true ;
104
+ for (RF2File source : sources ) {
105
+ if (source instanceof RF2Directory ) {
106
+ console .log ("Only .txt and .zip files are accepted as RF2 source files. '%s' is a directory." , source .getPath ());
107
+ validSources = false ;
108
+ }
109
+ }
110
+
111
+ if (!validSources ) {
112
+ return ;
113
+ }
114
+
102
115
specification
103
116
.prepare (outputDirectory )
104
117
.create (new RF2CreateContext (specification , sources , console ));
You can’t perform that action at this time.
0 commit comments