Skip to content

Commit c8ca0ed

Browse files
Puts the static site export behind the preview flag.
1 parent 06c9e4f commit c8ca0ed

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/com/structurizr/cli/export/ExportCommand.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.structurizr.Workspace;
44
import com.structurizr.autolayout.graphviz.GraphvizAutomaticLayout;
55
import com.structurizr.cli.AbstractCommand;
6+
import com.structurizr.cli.Configuration;
67
import com.structurizr.documentation.Documentable;
78
import com.structurizr.export.*;
89
import com.structurizr.export.dot.DOTExporter;
@@ -122,6 +123,10 @@ public void run(String... args) throws Exception {
122123
outputDir.mkdirs();
123124

124125
if (STATIC_FORMAT.equals(format)) {
126+
if (!Configuration.PREVIEW_FEATURES) {
127+
throw new RuntimeException("Static site export is not available in this build - see https://docs.structurizr.com/cli for details of how to gain early access to new features");
128+
}
129+
125130
log.info(" - writing static site to " + outputDir.getAbsolutePath());
126131
unzip(getClass().getResourceAsStream("/static.zip"), outputPath);
127132

0 commit comments

Comments
 (0)