Skip to content

Commit fd9912f

Browse files
committed
ScriptInfo: report headless if headless attr set
The ModuleInfo interface does not have a dedicated headless setting (accessor/mutator). So let's use the "headless" attribute by convention.
1 parent 764f39e commit fd9912f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/org/scijava/script/ScriptInfo.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,11 @@ public ScriptModule createModule() throws ModuleException {
332332
return new ScriptModule(this);
333333
}
334334

335+
@Override
336+
public boolean canRunHeadless() {
337+
return is("headless");
338+
}
339+
335340
// -- Contextual methods --
336341

337342
@Override

0 commit comments

Comments
 (0)