summaryrefslogtreecommitdiff
path: root/internal/fsm
diff options
context:
space:
mode:
Diffstat (limited to 'internal/fsm')
-rw-r--r--internal/fsm/fsm.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/internal/fsm/fsm.go b/internal/fsm/fsm.go
index 292e09e..4fc647e 100644
--- a/internal/fsm/fsm.go
+++ b/internal/fsm/fsm.go
@@ -99,11 +99,13 @@ func (fsm *FSM) writeGraph() {
return
}
- f.WriteString(graph)
+ _, writeErr := f.WriteString(graph)
f.Close()
- cmd := exec.Command("mmdc", "-i", graphFile, "-o", graphImgFile, "--scale", "4")
-
- cmd.Start()
+ if writeErr != nil {
+ cmd := exec.Command("mmdc", "-i", graphFile, "-o", graphImgFile, "--scale", "4")
+ // Generating is best effort
+ _ = cmd.Start()
+ }
}
func (fsm *FSM) GoBack() {